|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-08-13 01:04 UTC] jani@php.net
[2008-08-13 07:51 UTC] jtaal at eljakim dot nl
[2008-08-13 23:27 UTC] nicos@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 05:00:01 2025 UTC |
Description: ------------ I'm getting a segmentation fault when running a very simple PHPUnit testcase. I'm using the latest pear package from pear.phpunit.de. The testcase is issuing an E_STRICT. I think deep inside PHPUnit something happens that causes this to happen. However, since PHPUnit is "just" a bunch of PHP classes, I dare say this is a bug inside the PHP interpreter. I've been able to run and crash this on both Linux (debian lenny) and Windows XP SP3 (both using PHP 5.2.6). Reproduce code: --------------- <?php // MyTest.php require_once 'PHPUnit/Framework.php'; class MyObject { public function getX() { return NULL; } } class MyTest extends PHPUnit_Framework_TestCase { public function test1() { $obj = new MyObject; $source = & $obj->getX(); } } Actual result: -------------- $ phpunit MyTest.php Strict Standards: Only variables should be assigned by reference in /home/jtaal/public_html/MyTest.php on line 18 PHPUnit 3.2.21 by Sebastian Bergmann. Segmentation fault