#27008 [NEW]: Every class method can be called as static

From: Date: Thu, 22 Jan 2004 18:31:36 +0000
Subject: #27008 [NEW]: Every class method can be called as static
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53764@lists.php.net to get a copy of this message
From: hoesh at dorsum dot hu Operating system: * PHP version: 5CVS-2004-01-22 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: Every class method can be called as static Description: ------------ Any method of any class can be called staticly. Internals and scripted ones too. * TipOfTheDay * Call any internal class's constructor from outside of object. As object doesn't exists, and ZE2 calls the internal constructor, process crashes immadiately. Reproduce code: --------------- <? domdocument::domdocument(); ?> , or <? domdocument::__construct(); ?> both works, to crash the process. <? class check { function not_static() { echo "Impossible, but works!"; } } check::not_static(); Expected result: ---------------- Warning or fatal error. Actual result: -------------- Crash. -- Edit bug report at http://bugs.php.net/?id=27008&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27008&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27008&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27008&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27008&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27008&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27008&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27008&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27008&r=support Expected behavior: http://bugs.php.net/fix.php?id=27008&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27008&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27008&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27008&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27008&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27008&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27008&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27008&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27008&r=float

« previous php.bugs (#53764) next »