[PHP-BUG] Bug #65729 [NEW]: CN_match gives false positive
From: datibbaw Operating system: Linux PHP version: master-Git-2013-09-21 (Git) Package: OpenSSL related Bug Type: Bug Bug description:CN_match gives false positive Description: When the CN_match option is used to verify "foo.test.com.sg" and the server certificate CN is "*.test.com" it will succeed erroneously. Test script: --- $context = stream_context_create(['ssl' => [ 'verify_peer' => true, 'allow_self_signed' => true, 'CN_match' => 'foo.test.com.sg', ]]); $s = file_get_contents($url, 'rt', $context); var_dump($s); Expected result: Warning: file_get_contents(): Peer certificate CN=`*.test.com' did not match expected CN=`foo.test.com.sg' in /path/to/script.php on line 12 Warning: file_get_contents(): Failed to enable crypto in /Users/tjerk/work/ssl/ssl.php on line 11 Warning: file_get_contents(https://localhost:4433): failed to open stream: operation failed in /path/to/script.php on line 11 bool(false) Actual result: -- No errors. -- Edit bug report at https://bugs.php.net/bug.php?id=65729&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65729&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65729&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65729&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65729&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65729&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65729&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65729&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65729&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=65729&r=support Expected behavior: https://bugs.php.net/fix.php?id=65729&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65729&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65729&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65729&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65729&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65729&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65729&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=65729&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65729&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65729&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65729&r=mysqlcfg
Req #42608 [PATCH]: Example #660 (filter_input_array) is wrong
Edit report at https://bugs.php.net/bug.php?id=42608&edit=1 ID: 42608 Patch added by: datib...@php.net Reported by:phpbugs dot 20 dot zsh at spamgourmet dot com Summary:Example #660 (filter_input_array) is wrong Status: Open Type: Feature/Change Request Package:Filter related Operating System: Irrelevant PHP Version:5.2.4 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: consistent_filter_input_array Revision: 1330353526 URL: https://bugs.php.net/patch-display.php?bug=42608&patch=consistent_filter_input_array&revision=1330353526 Previous Comments: [2012-02-22 13:29:09] datib...@php.net Fast forward to 2012, this is still wrong IMHO Possible bugs: 1) documentation problem; the return value is defined as an array or false in case of failure - when the respective INPUT_XXX is not populated, it returns null; clearly not expected according to the documentation. 2) wrong behaviour in the code; if INPUT_XXX is not populated, I would expect the return value to be this: array_fill_keys(array_keys($definition), null) [2009-10-08 03:02:44] ChadFulton at gmail dot com Although this is a very old bug, it seems to me that the poster is incorrect; I suspect the problem is that the poster attempted to set the $_POST array during runtime (e.g. $_POST = array( ... ); ), and filter_input_array does not allow runtime modification $_POST, $_GET, etc. [2007-09-10 11:04:44] phpbugs dot 20 dot zsh at spamgourmet dot com Description: The example will not output the array shown below the example code -- any undefined variable will cause filter_input_array() to return (so the output would be "NULL"). You'll notice I've classified this as a change request rather than a documentation problem, for the expected (and described ("Return Values")) behavior in example #660 makes WAY more sense. Reproduce code: --- http://www.php.net/filter_input_array -- Edit this bug report at https://bugs.php.net/bug.php?id=42608&edit=1
[PHP-BUG] Bug #62408 [NEW]: spl_autoload_register() doesn't always register an auto loader
From: datib...@php.net Operating system: N/A PHP version: 5.3.14 Package: SPL related Bug Type: Bug Bug description:spl_autoload_register() doesn't always register an auto loader Description: When spl_autoload_register() is called from within another auto load operation, spl_autoload_functions() will list the newly registered loader until PHP is done executing the newly included file, after which the loader is removed from the loader functions. Test script: --- spl_autoload [1] => Array ( [0] => Loader [1] => load ) ) after first autoload Array ( [0] => spl_autoload [1] => Array ( [0] => Loader [1] => load ) ) --- Array ( [0] => NonExistingClass ) Fatal error: Class 'NonExistingClass' not found in loader.php on line 35 Actual result: -- after spl_autoload_register() Array ( [0] => spl_autoload [1] => Array ( [0] => Loader [1] => load ) ) after first autoload Array ( [0] => spl_autoload ) --- Fatal error: spl_autoload(): Class NonExistingClass could not be loaded in loader.php on line 35 -- Edit bug report at https://bugs.php.net/bug.php?id=62408&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62408&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62408&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62408&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62408&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62408&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62408&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62408&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62408&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62408&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62408&r=support Expected behavior: https://bugs.php.net/fix.php?id=62408&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62408&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62408&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62408&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62408&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62408&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62408&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62408&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62408&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62408&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62408&r=mysqlcfg
#50111 [NEW]: memory leak when stream_context_create is used
From: datib...@php.net Operating system: Linux PHP version: 5.2.11 PHP Bug Type: Streams related Bug description: memory leak when stream_context_create is used Description: When stream_context_create() is used in conjunction with file_get_contents() or other stream related functions that accept a context parameter, memory is being leaked. Reproduce code: --- for ($i=0;$i<5;++$i){ $m0 = memory_get_usage(); file_get_contents('http://www.google.com', false, stream_context_create(array())); $m1 = memory_get_usage(); echo $m1-$m0,PHP_EOL; } Expected result: X (where X is the memory increase for the first iterator) 0 0 0 0 Actual result: -- X (where X is the memory increase for the first iterator) 384 (or something similar) 420 420 480 -- Edit bug report at http://bugs.php.net/?id=50111&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50111&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50111&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50111&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50111&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50111&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50111&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50111&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50111&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50111&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50111&r=support Expected behavior: http://bugs.php.net/fix.php?id=50111&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50111&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50111&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50111&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50111&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50111&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50111&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50111&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50111&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50111&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50111&r=mysqlcfg
[PHP-BUG] Bug #51854 [NEW]: stream_set_read_buffer() not working as expected
From: Operating system: Linux PHP version: Irrelevant Package: Streams related Bug Type: Bug Bug description:stream_set_read_buffer() not working as expected Description: Recently, the stream_set_read_buffer() was introduced; it's signature suggests that a buffer size can be set. However, when passing any non-zero value, the stream becomes unbuffered. This is because of a missing check inside _php_stream_set_option(): if (value == PHP_STREAM_BUFFER_NONE) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; } else { stream->flags ^= PHP_STREAM_FLAG_NO_BUFFER; } Test script: --- Expected result: Either the read() loads 1024 bytes, which would be ideal, or it should still load the default buffer size (8192 bytes). The attached patch addresses the latter behaviour. -- Edit bug report at http://bugs.php.net/bug.php?id=51854&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51854&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51854&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51854&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51854&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51854&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51854&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51854&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51854&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51854&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51854&r=support Expected behavior: http://bugs.php.net/fix.php?id=51854&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51854&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51854&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51854&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51854&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51854&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51854&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51854&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51854&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51854&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51854&r=mysqlcfg
[PHP-BUG] Req #55451 [NEW]: substr_compare and case sensitivity
From: datibbaw Operating system: NA PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:substr_compare and case sensitivity Description: The $length parameter of this function is optional in the documentation, but currently it can't be skipped to only set the case sensitivity flag. Values like null or false get converted into 0 which causes a warning and the function returns false. Using null to skip the $length parameter would be nice. Test script: --- Expected result: 0 Actual result: -- Warning: substr_compare(): The length must be greater than zero -- Edit bug report at https://bugs.php.net/bug.php?id=55451&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55451&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55451&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55451&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55451&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55451&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55451&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55451&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55451&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55451&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55451&r=support Expected behavior: https://bugs.php.net/fix.php?id=55451&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55451&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55451&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55451&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55451&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=55451&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55451&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55451&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55451&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55451&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55451&r=mysqlcfg
Req #55451 [PATCH]: substr_compare and case sensitivity
Edit report at https://bugs.php.net/bug.php?id=55451&edit=1 ID: 55451 Patch added by: datib...@php.net Reported by:datib...@php.net Summary:substr_compare and case sensitivity Status: Open Type: Feature/Change Request Package:Unknown/Other Function Operating System: NA PHP Version:Irrelevant Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: substr_compare_optlen Revision: 1313682989 URL: https://bugs.php.net/patch-display.php?bug=55451&patch=substr_compare_optlen&revision=1313682989 Previous Comments: [2011-08-18 15:55:57] datib...@php.net Description: The $length parameter of this function is optional in the documentation, but currently it can't be skipped to only set the case sensitivity flag. Values like null or false get converted into 0 which causes a warning and the function returns false. Using null to skip the $length parameter would be nice. Test script: --- Expected result: 0 Actual result: -- Warning: substr_compare(): The length must be greater than zero -- Edit this bug report at https://bugs.php.net/bug.php?id=55451&edit=1
Req #39962 [PATCH]: Suggestion: SUBSTR_ADD Function
Edit report at https://bugs.php.net/bug.php?id=39962&edit=1 ID: 39962 Patch added by: datib...@php.net Reported by:pjoe444 at hotmail dot com Summary:Suggestion: SUBSTR_ADD Function Status: Open Type: Feature/Change Request Package:Feature/Change Request PHP Version:5.2.0 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314108314 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314108314 Previous Comments: [2006-12-27 14:55:17] pjoe444 at hotmail dot com ( SUBTRACTION, on the other hand, does work simply enough with the current system: with SUBSTR_REPLACE being able to replace a character with an empty string "" ) [2006-12-27 14:42:30] pjoe444 at hotmail dot com Description: SUGGESTION to the PhP Group (I did not find any place for suggestions on the site: the suggestion links seem to point here) How about a SUBSTR_ADD function similar to substr_replace substr_add (mixed string, string replacement, int start [, int length] ) example when handling time (in schedules etc) $var=1245 $var= substr_add ($var, ':', 2); $var value now 12:45 Yes-- you can split and add and rejoin strings, or probably use preg_replace, but I am surprised that such a simple useful facility does not seem to be available in PHP ! :-( Thanks! Peter Douglas Reproduce code: --- N/A Expected result: N/A -- Edit this bug report at https://bugs.php.net/bug.php?id=39962&edit=1
Req #39962 [PATCH]: Suggestion: SUBSTR_ADD Function
Edit report at https://bugs.php.net/bug.php?id=39962&edit=1 ID: 39962 Patch added by: datib...@php.net Reported by:pjoe444 at hotmail dot com Summary:Suggestion: SUBSTR_ADD Function Status: Open Type: Feature/Change Request Package:Feature/Change Request PHP Version:5.2.0 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314108530 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314108530 Previous Comments: [2011-08-23 14:05:14] datib...@php.net The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314108314 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314108314 [2006-12-27 14:55:17] pjoe444 at hotmail dot com ( SUBTRACTION, on the other hand, does work simply enough with the current system: with SUBSTR_REPLACE being able to replace a character with an empty string "" ) [2006-12-27 14:42:30] pjoe444 at hotmail dot com Description: SUGGESTION to the PhP Group (I did not find any place for suggestions on the site: the suggestion links seem to point here) How about a SUBSTR_ADD function similar to substr_replace substr_add (mixed string, string replacement, int start [, int length] ) example when handling time (in schedules etc) $var=1245 $var= substr_add ($var, ':', 2); $var value now 12:45 Yes-- you can split and add and rejoin strings, or probably use preg_replace, but I am surprised that such a simple useful facility does not seem to be available in PHP ! :-( Thanks! Peter Douglas Reproduce code: --- N/A Expected result: N/A -- Edit this bug report at https://bugs.php.net/bug.php?id=39962&edit=1
Req #15232 [Com]: Need a possibility to compare two references
Edit report at https://bugs.php.net/bug.php?id=15232&edit=1 ID: 15232 Comment by: datib...@php.net Reported by:flying at dom dot natm dot ru Summary:Need a possibility to compare two references Status: Open Type: Feature/Change Request Package:Feature/Change Request Operating System: All PHP Version:4.0.6 Block user comment: N Private report: N New Comment: For scalar values, this is impossible. And you probably don't want this either, because $a and $b might actually point to the same value (e.g. due to compiler optimization) For objects you could use the equality operator (===). For example: $a = new mynumber(5); $b = new mynumber(5); echo $a === $b; Previous Comments: [2002-01-26 06:18:25] flying at dom dot natm dot ru PHP have no possiblity to find, if two references points to the same actual variable, but sometimes it is necesary. Short example: $a = 5; $b = 5; $a_ref1 = &$a; $a_ref2 = &$a; $b_ref = &$b; PHP needs a function (or operator) which will return TRUE, when comparing $a_ref1 and $a_ref2, but FALSE, if comparing $a_ref1 and $b_ref. -- Edit this bug report at https://bugs.php.net/bug.php?id=15232&edit=1
Req #17565 [Com]: optional ORDER parameter for range()
Edit report at https://bugs.php.net/bug.php?id=17565&edit=1 ID: 17565 Comment by: datib...@php.net Reported by:bigredlinux at yahoo dot com Summary:optional ORDER parameter for range() Status: Open Type: Feature/Change Request Package:Feature/Change Request Operating System: Linux PHP Version:4.2.1 Block user comment: N Private report: N New Comment: range() now has that option since 5.0, though it will still assume the step size is negative when the start value is higher than the end value. Previous Comments: [2002-06-02 05:52:40] bigredlinux at yahoo dot com The range() function has the ability to generate a range from one number (or character) to another. It states in the documentation that if the first number (character) is greater than the second, it creates a decreasing range. However, the problem is, sometimes you don't want it to switch range order, so it would be nice to have a third parameter which states the direction or states whether you want it to auto flip. Hence, if I did range(9, 0, ASC) it would generate an empty array... or prehaps I could do range(9, 0, false) for not autoflipping. -- Edit this bug report at https://bugs.php.net/bug.php?id=17565&edit=1
Req #39962 [PATCH]: Suggestion: SUBSTR_ADD Function
Edit report at https://bugs.php.net/bug.php?id=39962&edit=1 ID: 39962 Patch added by: datib...@php.net Reported by:pjoe444 at hotmail dot com Summary:Suggestion: SUBSTR_ADD Function Status: Open Type: Feature/Change Request Package:*General Issues PHP Version:5.2.0 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314113875 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314113875 Previous Comments: [2011-08-23 14:28:57] ar...@php.net substr_replace() already provides this when the length argument is 0. [2011-08-23 14:08:50] datib...@php.net The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314108530 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314108530 [2011-08-23 14:05:14] datib...@php.net The following patch has been added/updated: Patch Name: substr_insert.patch Revision: 1314108314 URL: https://bugs.php.net/patch-display.php?bug=39962&patch=substr_insert.patch&revision=1314108314 [2006-12-27 14:55:17] pjoe444 at hotmail dot com ( SUBTRACTION, on the other hand, does work simply enough with the current system: with SUBSTR_REPLACE being able to replace a character with an empty string "" ) [2006-12-27 14:42:30] pjoe444 at hotmail dot com Description: SUGGESTION to the PhP Group (I did not find any place for suggestions on the site: the suggestion links seem to point here) How about a SUBSTR_ADD function similar to substr_replace substr_add (mixed string, string replacement, int start [, int length] ) example when handling time (in schedules etc) $var=1245 $var= substr_add ($var, ':', 2); $var value now 12:45 Yes-- you can split and add and rejoin strings, or probably use preg_replace, but I am surprised that such a simple useful facility does not seem to be available in PHP ! :-( Thanks! Peter Douglas Reproduce code: --- N/A Expected result: N/A -- Edit this bug report at https://bugs.php.net/bug.php?id=39962&edit=1
Req #31375 [PATCH]: array_set_current
Edit report at https://bugs.php.net/bug.php?id=31375&edit=1 ID: 31375 Patch added by: datib...@php.net Reported by:ceo at l-i-e dot com Summary:array_set_current Status: Open Type: Feature/Change Request Package:Feature/Change Request Operating System: All PHP Version:Irrelevant Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: reset_end_with_offset.patch.txt Revision: 1314116064 URL: https://bugs.php.net/patch-display.php?bug=31375&patch=reset_end_with_offset.patch.txt&revision=1314116064 Previous Comments: [2005-01-01 21:16:05] ceo at l-i-e dot com Description: While messing around with next/current/end/prev on large arrays, it became apparent that there is a gaping hole in functionality: I can't set the current internal pointer of the array to an arbitrary value. :-( I have to walk through the whole array to the element I want as my 'current' An array_set_current function which takes an array and integer to set the current internal pointer to the N'th element is pretty important for quickly starting off at the right place in my array. -- Edit this bug report at https://bugs.php.net/bug.php?id=31375&edit=1
[PHP-BUG] Req #55503 [NEW]: Extend __getTypes to support enumerations
From: datibbaw Operating system: N/A PHP version: 5.4SVN-2011-08-25 (snap) Package: SOAP related Bug Type: Feature/Change Request Bug description:Extend __getTypes to support enumerations Description: The __getTypes() method helps to serve as a reference when writing SOAP consumer code, which is very useful. However, enumeration types in WSDL aren't supported properly; they're printed as only the enumeration base type (which is usually 'string' in my case). Test script: --- Expected result: string PersonaMemberType {NEW,LIMITED,FREE,PAID_ACTIVE,TRIAL_ACTIVE,PAID_EXPIRED,TRIAL_EXPIRED} Actual result: -- string PersonaMemberType -- Edit bug report at https://bugs.php.net/bug.php?id=55503&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55503&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55503&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55503&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55503&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55503&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55503&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55503&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55503&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55503&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55503&r=support Expected behavior: https://bugs.php.net/fix.php?id=55503&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55503&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55503&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55503&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55503&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=55503&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55503&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55503&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55503&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55503&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55503&r=mysqlcfg
Bug #54971 [PATCH]: wrong result with DOMNodeList and iterator_to_array use_keys
Edit report at https://bugs.php.net/bug.php?id=54971&edit=1 ID: 54971 Patch added by: datib...@php.net Reported by:jinmoku at hotmail dot com Summary:wrong result with DOMNodeList and iterator_to_array use_keys Status: Closed Type: Bug Package:DOM XML related Operating System: Win 7 PHP Version:5.3.6 Assigned To:pierrick Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug54971.phpt.patch Revision: 1314677817 URL: https://bugs.php.net/patch-display.php?bug=54971&patch=bug54971.phpt.patch&revision=1314677817 Previous Comments: [2011-06-29 19:14:13] pierr...@php.net 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. [2011-06-01 16:12:34] jinmoku at hotmail dot com Description: when you pass a DOMNodeList in iterator_to_array there a weird result with use_keys on true Test script: --- $source = << val1 val2 XML; $doc = new DOMDocument(); $doc->loadXML($source); $xpath = new DOMXPath($doc); $items = $xpath->query('//node'); print_r(iterator_to_array($items, true)); print_r(iterator_to_array($items, false)); Expected result: Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) Actual result: -- Array ( [6646882] => DOMElement Object ( ) ) Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) -- Edit this bug report at https://bugs.php.net/bug.php?id=54971&edit=1
Bug #54971 [PATCH]: wrong result with DOMNodeList and iterator_to_array use_keys
Edit report at https://bugs.php.net/bug.php?id=54971&edit=1 ID: 54971 Patch added by: datib...@php.net Reported by:jinmoku at hotmail dot com Summary:wrong result with DOMNodeList and iterator_to_array use_keys Status: Closed Type: Bug Package:DOM XML related Operating System: Win 7 PHP Version:5.3.6 Assigned To:pierrick Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug54971.phpt.patch Revision: 1314710371 URL: https://bugs.php.net/patch-display.php?bug=54971&patch=bug54971.phpt.patch&revision=1314710371 Previous Comments: [2011-08-30 04:18:09] datib...@php.net The test got marked as failed on my machine, because of --disable-dom Attached a patch to skip the test in those cases ;-) [2011-08-30 04:16:57] datib...@php.net The following patch has been added/updated: Patch Name: bug54971.phpt.patch Revision: 1314677817 URL: https://bugs.php.net/patch-display.php?bug=54971&patch=bug54971.phpt.patch&revision=1314677817 [2011-06-29 19:14:13] pierr...@php.net 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. [2011-06-01 16:12:34] jinmoku at hotmail dot com Description: when you pass a DOMNodeList in iterator_to_array there a weird result with use_keys on true Test script: --- $source = << val1 val2 XML; $doc = new DOMDocument(); $doc->loadXML($source); $xpath = new DOMXPath($doc); $items = $xpath->query('//node'); print_r(iterator_to_array($items, true)); print_r(iterator_to_array($items, false)); Expected result: Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) Actual result: -- Array ( [6646882] => DOMElement Object ( ) ) Array ( [0] => DOMElement Object ( ) [1] => DOMElement Object ( ) ) -- Edit this bug report at https://bugs.php.net/bug.php?id=54971&edit=1
[PHP-BUG] Bug #55555 [NEW]: readlink() behaviour changed
From: datibbaw Operating system: Linux 2.6.39+ PHP version: 5.4SVN-2011-08-31 (SVN) Package: Filesystem function related Bug Type: Bug Bug description:readlink() behaviour changed Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit bug report at https://bugs.php.net/bug.php?id=5&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=5&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=5&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=5&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=5&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=5&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=5&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=5&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=5&r=needscript Try newer version: https://bugs.php.net/fix.php?id=5&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=5&r=support Expected behavior: https://bugs.php.net/fix.php?id=5&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=5&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=5&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=5&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=5&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=5&r=dst IIS Stability: https://bugs.php.net/fix.php?id=5&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=5&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=5&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=5&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=5&r=mysqlcfg
Bug #55555 [PATCH]: readlink() behaviour changed
Edit report at https://bugs.php.net/bug.php?id=5&edit=1 ID: 5 Patch added by: datib...@php.net Reported by:datib...@php.net Summary:readlink() behaviour changed Status: Open Type: Bug Package:Filesystem function related Operating System: Linux 2.6.39+ PHP Version:5.4SVN-2011-08-31 (SVN) Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug5.patch Revision: 1314807382 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.patch&revision=1314807382 Previous Comments: [2011-08-31 16:15:21] datib...@php.net Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of >ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit this bug report at https://bugs.php.net/bug.php?id=5&edit=1
Bug #55555 [Com]: readlink() behaviour changed
Edit report at https://bugs.php.net/bug.php?id=5&edit=1 ID: 5 Comment by: datib...@php.net Reported by:datib...@php.net Summary:readlink() behaviour changed Status: Open Type: Bug Package:Filesystem function related Operating System: Linux 2.6.39+ PHP Version:5.4SVN-2011-08-31 (SVN) Block user comment: N Private report: N New Comment: Added a patch that should cleanly apply on PHP_5_4 Previous Comments: [2011-08-31 16:16:22] datib...@php.net The following patch has been added/updated: Patch Name: bug5.patch Revision: 1314807382 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.patch&revision=1314807382 [2011-08-31 16:15:21] datib...@php.net Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of >ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit this bug report at https://bugs.php.net/bug.php?id=5&edit=1
Bug #55555 [PATCH]: readlink() behaviour changed
Edit report at https://bugs.php.net/bug.php?id=5&edit=1 ID: 5 Patch added by: datib...@php.net Reported by:datib...@php.net Summary:readlink() behaviour changed Status: Open Type: Bug Package:Filesystem function related Operating System: Linux 2.6.39+ PHP Version:5.4SVN-2011-08-31 (SVN) Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug5.phpt.patch Revision: 1314807932 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.phpt.patch&revision=1314807932 Previous Comments: [2011-08-31 16:16:50] datib...@php.net Added a patch that should cleanly apply on PHP_5_4 [2011-08-31 16:16:22] datib...@php.net The following patch has been added/updated: Patch Name: bug5.patch Revision: 1314807382 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.patch&revision=1314807382 [2011-08-31 16:15:21] datib...@php.net Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of >ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit this bug report at https://bugs.php.net/bug.php?id=5&edit=1
Bug #55555 [PATCH]: readlink() behaviour changed
Edit report at https://bugs.php.net/bug.php?id=5&edit=1 ID: 5 Patch added by: datib...@php.net Reported by:datib...@php.net Summary:readlink() behaviour changed Status: Open Type: Bug Package:Filesystem function related Operating System: Linux 2.6.39+ PHP Version:5.4SVN-2011-08-31 (SVN) Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug5.v1.phpt.patch Revision: 1314808677 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.v1.phpt.patch&revision=1314808677 Previous Comments: [2011-08-31 16:25:32] datib...@php.net The following patch has been added/updated: Patch Name: bug5.phpt.patch Revision: 1314807932 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.phpt.patch&revision=1314807932 [2011-08-31 16:16:50] datib...@php.net Added a patch that should cleanly apply on PHP_5_4 [2011-08-31 16:16:22] datib...@php.net The following patch has been added/updated: Patch Name: bug5.patch Revision: 1314807382 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.patch&revision=1314807382 ---- [2011-08-31 16:15:21] datib...@php.net Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of >ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit this bug report at https://bugs.php.net/bug.php?id=5&edit=1
Bug #55555 [Com]: readlink() behaviour changed
Edit report at https://bugs.php.net/bug.php?id=5&edit=1 ID: 5 Comment by: datib...@php.net Reported by:datib...@php.net Summary:readlink() behaviour changed Status: Open Type: Bug Package:Filesystem function related Operating System: Linux 2.6.39+ PHP Version:5.4SVN-2011-08-31 (SVN) Block user comment: N Private report: N New Comment: Added bug5.v1.phpt.patch to fix ext/standard/tests/file/readlink_variation1.phpt Previous Comments: [2011-08-31 16:37:57] datib...@php.net The following patch has been added/updated: Patch Name: bug5.v1.phpt.patch Revision: 1314808677 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.v1.phpt.patch&revision=1314808677 [2011-08-31 16:25:32] datib...@php.net The following patch has been added/updated: Patch Name: bug5.phpt.patch Revision: 1314807932 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.phpt.patch&revision=1314807932 [2011-08-31 16:16:50] datib...@php.net Added a patch that should cleanly apply on PHP_5_4 [2011-08-31 16:16:22] datib...@php.net The following patch has been added/updated: Patch Name: bug5.patch Revision: 1314807382 URL: https://bugs.php.net/patch-display.php?bug=5&patch=bug5.patch&revision=1314807382 ---- [2011-08-31 16:15:21] datib...@php.net Description: >From Linux kernels 2.6.39 onwards, readlink() returns EINVAL instead of >ENOENT. This causes the wrong error message to be shown. Test script: --- Test case: ext/standard/tests/file/readlink_realpath_variation3.phpt -- Edit this bug report at https://bugs.php.net/bug.php?id=5&edit=1
Bug #63240 [PATCH]: stream_get_line return contains delimiter string
Edit report at https://bugs.php.net/bug.php?id=63240&edit=1 ID: 63240 Patch added by: datib...@php.net Reported by:scope at planetavent dot de Summary:stream_get_line return contains delimiter string Status: Open Type: Bug Package:Streams related Operating System: Windows Server 2008 / RHEL 6.2 PHP Version:5.3.17 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: getrecord-delimiter-search-fix Revision: 1349773338 URL: https://bugs.php.net/patch-display.php?bug=63240&patch=getrecord-delimiter-search-fix&revision=1349773338 Previous Comments: [2012-10-09 03:35:35] datib...@php.net Reduced test: $file = __DIR__ . '/input_dummy.txt'; $data = str_repeat( '.', 8189 ) . ''; file_put_contents( $file, $data ); $fh = fopen( $file, "rb" ); $delimiter = "MM"; stream_get_line($fh, 4096, $delimiter); stream_get_line($fh, 4096, $delimiter); if ($delimiter === stream_get_line($fh, 4096, $delimiter)) { echo "BROKEN"; } else { echo "OK"; } fclose($fh); unlink($file); The amount of dots seems to be related to the used buffer length: ( + 3) % ( x 2) == 0 The length of the delimiter also seems to play a role, but I'm not sure what that would be. [2012-10-08 16:03:38] scope at planetavent dot de Description: On specific file input stream_get_line returns a "line" that actually contains the delimiter. PHP 5.3.10 does not show this problem, PHP versions from 5.3.11 to 5.3.17 do. PHP 5.4.7 seems to be affected as well. Bug #44607 seems to be related, but was fixed long time ago. Test script: --- https://bugs.php.net/bug.php?id=63240&edit=1