Someone meant to use strlen() instead of sizeof() but neither is necessary
[squirrelmail.git] / functions / imap_general.php
index ade39d6240904df04b81ad009181fcec79dc48be..9221c87b66ba6101a0ffa1a830f7a786de207f38 100755 (executable)
@@ -1335,7 +1335,7 @@ function sqimap_parse_namespace(&$input) {
                 $namespace[$ns_strings[$i]] = array();
             } else {
                 // Pop-out the first ( and last ) for easier parsing
-                $ns = substr($regs[$i], 1, sizeof($regs[$i])-2);
+                $ns = substr($regs[$i], 1, -1);
                 if($c = preg_match_all('/\((?:(.*?)\s*?)\)/', $ns, $regs2)) {
                     $namespace[$ns_strings[$i]] = array();
                     for($j=0; $j<sizeof($regs2[1]); $j++) {