implementing request #4395
git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@200375 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
06ff9b6657
commit
56c0b11709
|
|
@ -1550,7 +1550,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
function _func()
|
function _func()
|
||||||
{
|
{
|
||||||
$num_args = 0; // number of arguments received
|
$num_args = 0; // number of arguments received
|
||||||
$function = $this->_current_token;
|
$function = strtoupper($this->_current_token);
|
||||||
$result = ''; // initialize result
|
$result = ''; // initialize result
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$this->_advance(); // eat the "("
|
$this->_advance(); // eat the "("
|
||||||
|
|
@ -1579,6 +1579,9 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
}
|
}
|
||||||
$num_args++;
|
$num_args++;
|
||||||
}
|
}
|
||||||
|
if (!isset($this->_functions[$function])) {
|
||||||
|
return $this->raiseError("Function $function() doesn't exist");
|
||||||
|
}
|
||||||
$args = $this->_functions[$function][1];
|
$args = $this->_functions[$function][1];
|
||||||
// If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
|
// If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
|
||||||
if (($args >= 0) and ($args != $num_args)) {
|
if (($args >= 0) and ($args != $num_args)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue