|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-02-11 10:05 UTC] aurelien dot dudouit at corp dot ovh dot com
-PHP Version: 5.6.17
+PHP Version: 5.6.18
[2016-02-11 10:05 UTC] aurelien dot dudouit at corp dot ovh dot com
[2016-08-25 14:08 UTC] cmb@php.net
-Summary: Bad dba_replace condition because of Zend MM
wrong use
+Summary: Bad dba_replace condition because of wrong
API usage
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2016-08-25 15:00 UTC] cmb@php.net
[2016-08-25 15:00 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2016-10-17 10:09 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 06:00:01 2025 UTC |
Description: ------------ dba_replace fails, ending in 'Could not copy group [x - x] to temporary stream' because of a bad condition. php_stream_copy_to_stream() has been replaced since 5.5 with php_stream_copy_to_stream_ex() without updating the conditions into which it's been enclosed; the newer function returns SUCCESS which is set to 0, hence the following check isn't valid anymore because it's expecting non-zero value (size_t): if (!php_stream_copy_to_stream_ex(...)) { It's been fixed in PHP7.0: if (SUCCESS != php_stream_copy_to_stream_ex(...)) { A patch has already been proposed two years ago, see: http://git.php.net/?p=php-src.git;a=commit;h=9e309a2d10d9696d047ecb442 Test script: --------------- <?php $db = dba_open("foo.inifile", 'c', 'inifile'); dba_insert('foo', 'value1', $db); dba_replace('foo', 'value2', $db); echo dba_fetch('foo', $db); dba_close($db); ?> Expected result: ---------------- All PHP versions >=5.3: value2 Actual result: -------------- PHP5.6 and PHP5.5: value1