Doc #63962 [NEW]: trigger_error(): error massage is limited 1024 bytes instead of characters

From: Date: Thu, 10 Jan 2013 20:47:42 +0000
Subject: Doc #63962 [NEW]: trigger_error(): error massage is limited 1024 bytes instead of characters
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9377@lists.php.net to get a copy of this message
From: takagi@php.net Operating system: Irrelevant PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:trigger_error(): error massage is limited 1024 bytes instead of characters Description: ------------ http://php.net/trigger_error The description of the error_msg parameter says "It's limited to 1024 characters in length." but actually it's limited to 1024 bytes instead of characters. Test script: --------------- $m = str_repeat('Ä', 510) . '0123456789'; var_dump(strlen($m)); // 520 (= 510 + 10) characters var_dump(mb_strlen($m,'UTF-8')); // ... but 1030 (= 510*2 + 10) bytes in UTF-8 trigger_error($m); Expected result: ---------------- int(1030) int(520) PHP Notice: Ä ... Ä0123456789 in (filename) Actual result: -------------- int(1030) int(520) PHP Notice: Ä ... Ä0123 in (filename) -- Edit bug report at https://bugs.php.net/bug.php?id=63962&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63962&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63962&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63962&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63962&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63962&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63962&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63962&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63962&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63962&r=support Expected behavior: https://bugs.php.net/fix.php?id=63962&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63962&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63962&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63962&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63962&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63962&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63962&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63962&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63962&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63962&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63962&r=mysqlcfg

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