dmitry          Fri Jun 29 14:53:02 2007 UTC

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  ord() must not convert binary data to unicode in unicode mode
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.645&r2=1.646&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.645 php-src/ext/standard/string.c:1.646
--- php-src/ext/standard/string.c:1.645 Mon Jun 18 13:54:59 2007
+++ php-src/ext/standard/string.c       Fri Jun 29 14:53:02 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.645 2007/06/18 13:54:59 dmitry Exp $ */
+/* $Id: string.c,v 1.646 2007/06/29 14:53:02 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3613,7 +3613,9 @@
                WRONG_PARAM_COUNT;
        }
 
-       convert_to_text_ex(str);
+       if (Z_TYPE_PP(str) != IS_UNICODE && Z_TYPE_PP(str) != IS_STRING) {
+               convert_to_text_ex(str);
+       }
        if (Z_TYPE_PP(str) == IS_UNICODE) {
                RETURN_LONG(zend_get_codepoint_at(Z_USTRVAL_PP(str), 
Z_USTRLEN_PP(str), 0));
        } else {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to