php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45643 comment terminates script processing
Submitted: 2008-07-28 07:30 UTC Modified: 2008-08-05 01:00 UTC
From: christian dot reinecke at web dot de Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.6 OS: Mac OS X 10.5.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-07-28 07:30 UTC] christian dot reinecke at web dot de
Description:
------------
I installed the php QCodo framework (Current Development Version, qcodo-0.3.43.tar.gz), which includes a couple of it's own files.

qcodo/_core/framework/QApplicationBase.class.php
includes on line 304 in a foreach-loop some files, in the last loop
qcodo/_core/framework/QQuery.class.php

this fails with no output (error_reporting on E_ALL | E_STRICT, display_errors true, same "output" (or missing output) when using error_log() instead of print/echo.


// Preload Class Files
var_dump(PHP_VERSION);
//foreach (QApplication::$PreloadedClassFile as $strClassFile) {
    $x = "/Users/chriz/Documents/workspace/figufi.local/includes/qcodo/_core/framework/QQuery.class.php";
    var_dump($x, is_file($x), is_readable($x), filesize($x)); flush();
    $r = require $x;
    var_dump("$r, $x included"); flush();
//}
echo "end"; exit;


var_dump() is never executed in this case, the only output is
string(5) "5.2.6" string(93) "/Users/chriz/Documents/workspace/figufi.local/includes/qcodo/_core/framework/QQuery.class.php" bool(true) bool(true) int(49564) 


using echo "byebye"; flush(); ob_end_flush(); die("-"); as first command in that file has no effect either. Deleting the file has the effect, that require fails.

Now I started to delete content from the end of that file, this code still does not work:
http://nopaste.php-quake.net/39881

If I delete the last empty method in this file, it works. (var_dump() and "end"/exit is shown). But it's getting more strange, if I don't remove that method, but remove the comment (!) above, it ends in an E_STRICT warning:

Declaration of QQSubQuerySqlNode::GetColumnAlias() should be compatible with that of QQNode::GetColumnAlias()
Error Type:   E_STRICT


This is NOT reproducable, neither on the same system (in another virtual host and simplified environment (less includes before)) nor on a Windows machine with the same PHP-Version.


Removing a comment or method should not end in a script termination. Sorry for this hard bug report with nearly no starting point, but maybe there's something wrong with the parser about comments or inheritance.

Expected result:
----------------
require the readable file and show the die() message at the beginning of the required file

Actual result:
--------------
require fails, neither the die() command in the required file is shown, nor something else after the require command

it's definitly not about the existance of the file or denied access to the file, it's its content

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 28 01:01:29 2024 UTC