note 94527 deleted from function.get-called-class by danbrown

From: Date: Tue, 10 Nov 2009 15:36:33 +0000
Subject: note 94527 deleted from function.get-called-class by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162718@lists.php.net to get a copy of this message
Note Submitter: webmaster at easy-coding dot de ---- i have a small fix for the get_called_class method for php versions prior php 5.3 by "laurence+nospam at sol1 dot com dot au" which i made for a script at easy-coding.de since method calls are caseinsensitive you should use stripos instead of strpos. Otherwise you will end up with a "Undefined offset: -1" notice and the error "Could not find caller class." See Line #23 <? } while (stripos($callerLine,$bt[$l]['function']) === false); ?>

« previous php.notes (#162718) next »