php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30377 Problem with php_check_syntax()
Submitted: 2004-10-09 22:39 UTC Modified: 2005-04-06 16:21 UTC
From: guth at fiifo dot u-psud dot fr Assigned: iliaa (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5CVS-2005-03-29 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: guth at fiifo dot u-psud dot fr
New email:
PHP Version: OS:

 

 [2004-10-09 22:39 UTC] guth at fiifo dot u-psud dot fr
Description:
------------
I get an error when i use php_check_syntax() with an invalid PHP file.

Reproduce code:
---------------
<?php
var_dump(php_check_syntax("test2.php"));
?>

in test2.php
<?php
        sddfdsf fsqd
?>


Expected result:
----------------
bool(false)

Actual result:
--------------
bool(false)

/usr/src/php5-STABLE-200410091830/main/streams/streams.c(375) : Stream of type 'STDIO' 0x831c7ec (path:test2.php) was not closed

The following diff seems to correct the problem :

[vincent@localhost php5-STABLE-200410091830]$ diff main/main.c2 main/main.c
1751a1752,1753
>       zend_destroy_file_handle(file TSRMLS_CC);
>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-11 07:52 UTC] derick@php.net
Wez, I saw this before too, seems streams related.
 [2005-03-29 01:47 UTC] sniper@php.net
Propably same as bug #31918

 [2005-04-06 16:21 UTC] iliaa@php.net
After extensive code review it was determined that it would take too many engine hacks to make it work properly and the function was removed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 07:01:30 2024 UTC