|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-27 10:39 UTC] drslump at pollinimini dot net
[2010-02-20 15:35 UTC] c dot robin at smartphp dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
Description: ------------ When a registered class accesses a static function that returns an empty string "", it results in a segmentation fault. This bug appears to be distinct from #16865 since it likely has to do with type conversion, but all the software and environment settings are the same. Reproduce code: --------------- <?php $app = new App(); $app->run(); class App { public function run () { $context = new JSContext(); $context->registerClass( 'TimeObject' ); echo $context->evaluateScript( 'var t = new TimeObject(); t.getTime();' ); } static function getString() { return ''; // <-- empty string causes seg fault //return ' '; // <-- a space won't cause seg fault } } class TimeObject { public function getTime () { return App::getString(); } } ?> Expected result: ---------------- getTime() returns an empty string Actual result: -------------- Apache error_log: [Thu Oct 08 13:43:29 2009] [notice] child pid 5629 exit signal Segmentation fault (11)