Calculation.php: runtime-created function on line 1

Feb 4, 2008 at 10:57 AM
I read in the Issue Tracker that this is a PHP bug:
Fatal error: Unsupported operand types in ***.Classes\PHPExcel\Calculation.php(664) : runtime-created function on line 1.
But I ran into it today. Is there anyway around?
Coordinator
Feb 4, 2008 at 11:43 AM
Unfortunately it is not possible to catch and ignore this error.
Feb 4, 2008 at 12:01 PM


maartenba wrote:
Unfortunately it is not possible to catch and ignore this error.

I saw that in the code. But what can I do if I get this error?
I hope this doesn't mean that I can't use PHPExcel?
Coordinator
Feb 4, 2008 at 1:03 PM
Most probably, there is some empty cell in your spreadsheet which causes the dynamic compilation to fail. Other option is to disable calculation on writing your file (see documentation).
Feb 4, 2008 at 1:08 PM
IS it possible that using 3^0.5 instead of POWER(3,0.5) causes this error?
Coordinator
Feb 4, 2008 at 2:33 PM
Are you using that as the formula? it might be the cause of this error, yes.
Feb 6, 2008 at 3:11 PM
I am having a similar problem with a number of formulas.

One in particular is this...
=IF(A2=0,"",A1/A2)

I get a message "Fatal error: Unsupported operand types in C:\Programming\sublive.com\phpexcel\Classes\PHPExcel\Calculation.php(664) : runtime-created function on line 1".

The formular is taken directly from Microsoft's site as an example.

Any idea what might be wrong?

Thanks

Wayne
Feb 6, 2008 at 4:17 PM
Did you try downloading the latest SVN version? There seemed to be a bug in the formula parser.
Coordinator
Feb 7, 2008 at 10:06 AM
Latest SVN version can be found on http://www.codeplex.com/PHPExcel/SourceControl/ListDownloadableCommits.aspx