php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55412 static call on non static method
Submitted: 2011-08-12 11:13 UTC Modified: 2011-08-13 04:09 UTC
From: dev at catalint dot ro Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.3.6 OS: CentOs
Private report: No CVE-ID: None
 [2011-08-12 11:13 UTC] dev at catalint dot ro
Description:
------------
$this->me in class "a" should not have 'cata' as a value.

Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_erros','on');
class a{
	public function bar(){
		echo $this->me;
	}
}

class b{
	function foo(){
		a::bar();
	}
}

$b=new b();
$b->me='cata';
$b->foo();

Expected result:
----------------
no echo or error thrown

Actual result:
--------------
cata

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-13 04:09 UTC] laruence@php.net
-Status: Open +Status: Bogus
 [2011-08-13 04:09 UTC] laruence@php.net
Closing as bogus, this thing is not a static call,  see #55311
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 00:01:32 2024 UTC