#29454 [Opn->Fbk]: php_check_syntax second argument doesn't work in the right way
| From: | tony2001@php.net | Date: | Wed, 18 Aug 2004 06:51:07 +0000 |
| Subject: | #29454 [Opn->Fbk]: php_check_syntax second argument doesn't work in the right way | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64817@lists.php.net to get a copy of this message | ||
ID: 29454
Updated by: tony2001@php.net
Reported By: et@php.net
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 5CVS-2004-07-30 (dev)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Works fine here.
Previous Comments:
------------------------------------------------------------------------
[2004-07-30 07:26:45] et@php.net
Description:
------------
The second argument of php_check_syntax is supposed to be passed by
reference. However, you need to specify the reference where the
function is called, like php_check_syntax($file, &$error); resulting
in
Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of php_check_syntax(). If you would like to enable
call-time pass-by-reference, you can set allow_call_time_pass_reference
to true in your INI file. However, future versions may not support this
any longer.
Reproduce code:
---------------
php_check_syntax("test.php", $error);
Expected result:
----------------
errorstring in $error
Actual result:
--------------
Notice: Undefined variable: error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29454&edit=1