|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29454 php_check_syntax second argument doesn't work in the right way
Submitted: 2004-07-30 07:26 UTC Modified: 2004-08-18 22:26 UTC
From: Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5CVS-2004-07-30 (dev) OS: Linux
Private report: No CVE-ID: None
 [2004-07-30 07:26 UTC]
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 08:51 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine here.
 [2004-08-18 22:26 UTC]
Has been fixed in the meanwhile.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 04:05:52 2022 UTC