cvs: pear /Spreadsheet_Excel_Writer/Writer Parser.php
| From: | Xavier Noguer Gallego | Date: | Sat, 12 Nov 2005 04:31:07 +0000 |
| Subject: | cvs: pear /Spreadsheet_Excel_Writer/Writer Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-36225@lists.php.net to get a copy of this message | ||
xnoguer Fri Nov 11 23:31:07 2005 EDT
Modified files:
/pear/Spreadsheet_Excel_Writer/Writer Parser.php
Log:
implementing request #4395
http://cvs.php.net/diff.php/pear/Spreadsheet_Excel_Writer/Writer/Parser.php?r1=1.55&r2=1.56&ty=u
Index: pear/Spreadsheet_Excel_Writer/Writer/Parser.php
diff -u pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.55
pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.56
--- pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.55 Fri Nov 11 23:15:18 2005
+++ pear/Spreadsheet_Excel_Writer/Writer/Parser.php Fri Nov 11 23:31:05 2005
@@ -1550,7 +1550,7 @@
function _func()
{
$num_args = 0; // number of arguments received
- $function = $this->_current_token;
+ $function = strtoupper($this->_current_token);
$result = ''; // initialize result
$this->_advance();
$this->_advance(); // eat the "("
@@ -1579,6 +1579,9 @@
}
$num_args++;
}
+ if (!isset($this->_functions[$function])) {
+ return $this->raiseError("Function $function() doesn't exist");
+ }
$args = $this->_functions[$function][1];
// 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)) {