[Phpfreechat-svn] SF.net SVN: phpfreechat: [787] trunk/lib/utf8/utf8_strlen.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-23 09:31:57
|
Revision: 787 http://svn.sourceforge.net/phpfreechat/?rev=787&view=rev Author: kerphi Date: 2006-09-23 02:31:52 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Fix a php notice Modified Paths: -------------- trunk/lib/utf8/utf8_strlen.php Modified: trunk/lib/utf8/utf8_strlen.php =================================================================== --- trunk/lib/utf8/utf8_strlen.php 2006-09-22 20:33:57 UTC (rev 786) +++ trunk/lib/utf8/utf8_strlen.php 2006-09-23 09:31:52 UTC (rev 787) @@ -11,7 +11,7 @@ */ function utf8_strlen($str) { $n=0; - for($i=0; strlen($str{$i}); $i++) { + for($i=0; isset($str{$i}) && strlen($str{$i})>0; $i++) { $c = ord($str{$i}); if (!($c & 0x80)) // single-byte (0xxxxxx) $n++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |