php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40253 Bug with classes!
Submitted: 2007-01-27 00:10 UTC Modified: 2007-02-08 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: seregwethrin at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.2.0 OS: Windows Server 2003
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-01-27 00:10 UTC] seregwethrin at gmail dot com
Description:
------------
I've tested this with Apache 2.0.59 and PHP 5.2.0

There's an critical class error. When you want to insert a predefined variable (i've get error with $_SESSION) as class var like $this->mysession

If you can't see this error i can send a video about error.

Reproduce code:
---------------
<?php
class general
{
	var $db;
	var $sess;
	var $eC;
	
	function general()
	{
		global $db, $eC, $_SESSION;
		//OR global $db, $eC;
		$this->db = $db;
		$this->eC = $eC;
		$this->sess = $_SESSION; //error line
	}
}
?>

Expected result:
----------------
Page loading loading and loading forever... No error, no log (apache and php log files are clear), no warning, and page loading... Nothing shows at the page.

Actual result:
--------------
I'll install PHP 5.1.2 and there's no error at 5.1.2. So there's and bug at php 5.2.0 (i'm sure)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-27 12:56 UTC] tony2001@php.net
Cannot reproduce or see any other problems with the code you've provided.
 [2007-01-31 22:08 UTC] seregwethrin at gmail dot com
Did you try to run class?

$x = new general();
 [2007-01-31 22:17 UTC] tony2001@php.net
Yes, I did and it works just fine.
 [2007-02-08 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 Apr 19 20:01:29 2024 UTC