php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30009 Using $this when not in object
Submitted: 2004-09-07 13:34 UTC Modified: 2004-09-07 14:33 UTC
From: onore at ua dot fm Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.1 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: onore at ua dot fm
New email:
PHP Version: OS:

 

 [2004-09-07 13:34 UTC] onore at ua dot fm
Description:
------------
See reproduce code, error:
Fatal error: Using $this when not in object context in C:\Apache\Apache2\htdocs\xxx\admin_start_events.php on line 14




Reproduce code:
---------------
function admin_start()
{
    $admin_start_BeforeShow = true;
    global $admin_start;

	if( ($this->Visible = (CheckS("3") == "success")) )
	{
		$admin_start->Visible = true;
		
	} else {
		$admin_start->Visible = false;
	}
    return $admin_start;
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-07 13:35 UTC] onore at ua dot fm
line #14 if( ($this->Visible = (CheckS("3") == "success")) )
 [2004-09-07 13:42 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 [2004-09-07 14:33 UTC] onore at ua dot fm
This is code work at PHP 4.3.5;
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed May 27 18:00:02 2026 UTC