Empty public names should be '' instead of False.
authorStéphane Jacob <sj@m4x.org>
Sun, 3 Jun 2012 10:18:43 +0000 (12:18 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 3 Jun 2012 10:18:43 +0000 (12:18 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/name.func.inc.php

index 1df275b..def816d 100644 (file)
@@ -253,7 +253,7 @@ function capitalize_name($name)
 
     // Extracts the first token of the name.
     if (!preg_match('/^(\pL+)(([\' -])(.*))?$/ui', $name, $m)) {
-        return false;
+        return '';
     }
 
     $token = mb_strtolower($m[1]);
@@ -278,7 +278,7 @@ function capitalize_name($name)
         if (($tail = capitalize_name($tail))) {
             return $token . $separator . $tail;
         }
-        return false;
+        return '';
     }
 
     return $token . $separator;