Doc #65801 [NEW]: trim() can return null

From: Date: Tue, 01 Oct 2013 12:51:29 +0000
Subject: Doc #65801 [NEW]: trim() can return null
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10341@lists.php.net to get a copy of this message
From: mausglov at yandex dot ru Operating system: Windows PHP version: 5.4.20 Package: Documentation problem Bug Type: Documentation Problem Bug description:trim() can return null Description: ------------ Please, add something like: For non-strings trim() can return null ( E.g. http://www.php.net/manual/en/function.parse-url.php has a similar remark ) Test script: --------------- <? $a = new \stdClass(); $b = trim( $a ); var_dump($b); Expected result: ---------------- Warning: trim() expects parameter 1 to be string, object given in ... on line 3 string(0) "" Actual result: -------------- Warning: trim() expects parameter 1 to be string, object given in ... on line 3 NULL -- Edit bug report at https://bugs.php.net/bug.php?id=65801&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65801&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65801&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65801&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65801&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65801&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65801&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65801&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65801&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65801&r=support Expected behavior: https://bugs.php.net/fix.php?id=65801&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65801&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65801&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65801&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65801&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65801&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65801&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65801&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65801&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65801&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65801&r=mysqlcfg

« previous php.doc.bugs (#10341) next »