andrei          Tue May  2 21:49:16 2006 UTC

  Modified files:              
    /php-src/ext/unicode        property.c 
  Log:
  FALSE on empty string.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/property.c?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/unicode/property.c
diff -u php-src/ext/unicode/property.c:1.2 php-src/ext/unicode/property.c:1.3
--- php-src/ext/unicode/property.c:1.2  Tue May  2 21:39:15 2006
+++ php-src/ext/unicode/property.c      Tue May  2 21:49:16 2006
@@ -14,7 +14,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: property.c,v 1.2 2006/05/02 21:39:15 andrei Exp $ */ 
+/* $Id: property.c,v 1.3 2006/05/02 21:49:16 andrei Exp $ */ 
 
 #include "php_unicode.h"
 
@@ -32,6 +32,10 @@
                return;
        }
 
+       if (str_len == 0) {
+               RETURN_FALSE;
+       }
+
        while (offset < str_len && result) {
                U16_NEXT(str, offset, str_len, ch);
                result = checker(ch);
@@ -40,9 +44,8 @@
        RETURN_BOOL(result);
 }
 
-/*
- * C/POSIX migration functinos
- */
+
+/* {{{ C/POSIX migration functions */
 
 PHP_FUNCTION(unicode_is_lower)
 {
@@ -104,6 +107,8 @@
        check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isprint);
 }
 
+/* }}} */
+
 
 /*
  * Local variables:

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

Reply via email to