Doc #63962 [Opn->Csd]: trigger_error(): error massage is limited 1024 bytes instead of characters

From: Date: Sat, 12 Jan 2013 00:39:13 +0000
Subject: Doc #63962 [Opn->Csd]: trigger_error(): error massage is limited 1024 bytes instead of characters
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9385@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63962&edit=1 ID: 63962 Updated by: frozenfire@php.net Reported by: takagi@php.net Summary: trigger_error(): error massage is limited 1024 bytes instead of characters -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2013-01-12 00:39:05] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=329090 Log: Indicated that error messages are truncated after 1024 bytes, instead of characters (not MB-aware). Closes bug #63962. ------------------------------------------------------------------------ [2013-01-10 20:47:41] takagi@php.net 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 this bug report at https://bugs.php.net/bug.php?id=63962&edit=1

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