Edit report at http://bugs.php.net/bug.php?id=52573&edit=1

 ID:                 52573
 Updated by:         fel...@php.net
 Reported by:        ti dot bugmenot at gmail dot com
 Summary:            SplFileObject::fscanf  Segmentation fault
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            SPL related
 PHP Version:        5.3.3
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-08-11 00:37:26] fel...@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=302085
Log: - Fixed bug #52573 (SplFileObject::fscanf Segmentation fault)

------------------------------------------------------------------------
[2010-08-10 10:15:00] ti dot bugmenot at gmail dot com

Description:
------------
Segmentation fault when using additional parameters
SplFileObject::fscanf 

Test script:
---------------
<?php // test



error_reporting(E_ALL);



echo "TEST 1:\n";

$f = new SplFileObject(__FILE__, 'r');

$f->fscanf('<?php // %s', $result);

echo $result;



echo "TEST 2:\n";

$result = null;

$f = new SplFileObject(__FILE__, 'r');

$f->fscanf('<?php // %s', $result);

echo $result;

Expected result:
----------------
TEST 1:

test



TEST 2:

test

Actual result:
--------------
TEST 1:

<br />

<b>Notice</b>:  Undefined variable: result in <b>/tmp/fail.php</b> on
line <b>7</b><br />

<br />

<b>Notice</b>:  Undefined variable: result in <b>/tmp/fail.php</b> on
line <b>8</b><br />





TEST 2:

<br />

<b>Warning</b>:  Parameter 3 to fscanf() expected to be a reference,
value given in <b>/tmp/fail.php</b> on line <b>15</b><br />

Segmentation fault




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52573&edit=1

Reply via email to