php.net |  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: et@php.net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5CVS-2004-07-30 (dev) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: et@php.net
New email:
PHP Version: OS:

 

 [2004-07-30 07:26 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 08:51 UTC] tony2001@php.net
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.
 [2004-08-18 22:26 UTC] et@php.net
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