|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27836 zend.ze1_compatibility_mode = On gives errors
Submitted: 2004-04-02 08:06 UTC Modified: 2004-04-02 16:18 UTC
From: Robin at RHarmsen dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.0RC1 OS: Windows XP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: Robin at RHarmsen dot nl
New email:
PHP Version: OS:


 [2004-04-02 08:06 UTC] Robin at RHarmsen dot nl
When I turn on zend Engine1 Compatibility mode my code stops working (It worked perfect on PHP4 and PHP5 withoud the compatibility mode)

PHP.ini diffreances:
zend.ze1_compatibility_mode = On  (off when error doesn't occure)
allow_call_time_pass_reference = Off
error_reporting  =  E_ALL
register_long_arrays = Off
register_argc_argv = Off

configure line (according to phpinfo())
Configure Command  cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"  

I think it is realy strange that an error occures when the mode is activated. though it works on PHP4 and PHP5 withoud the mode activated.

It looks like $db in the Menu class is'nt set

Reproduce code:
I got the source files located here to reproduce the bug

Expected result:
I expected that the menu was displayed

Actual result:
What I got was:
Fatal error: Call to a member function query() on a non-object in clsMenu.php on line 36


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-02 08:35 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-04-02 08:55 UTC] Robin at RHarmsen dot nl
I made a version withoud a DB...
It seems that when I set a property of a class in the constructor it suddenly disappears
with this code I get the following error:

Fatal error: Call to a member function query() on a non-object in bugcode.php on line 24

class A
	var $queryCount;
	function A() {
		$this->queryCount = 0;

	function query() {
		$this->queryCount = $this->queryCount + 1;

class B
	var $a;
	var $pageID;
	function B(&$a,$pageID = 1)	{
		$this->a =& $a;
		$this->pageID = $pageID;

	function showB() {
		$result = $this->a->query();

			echo "a = NULL<br/>";
			echo "a = $this->a;<br/>";

		echo "pageID = $this->pageID<br?>";

$a = new A();
$b = new B($a);
 [2004-04-02 16:18 UTC] Robin at RHarmsen dot nl
I just downloaded this CVS version:
Built On: Apr 01, 2004 18:30 GMT

and it alreadt seems to be fixed :D

I gues it was one of these (From the news.txt)
- Reimplement zend.ze1_compatibility_mode to have better PHP 4 complicance.
  (Dmitry, Andi)
- Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)
  (Dmitry, Andi)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 20:03:37 2021 UTC