Prechádzať zdrojové kódy

removed another bad usage of count()

George Appleton 7 rokov pred
rodič
commit
52b27cb953
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      library/Zend/Config/Yaml.php

+ 3 - 3
library/Zend/Config/Yaml.php

@@ -362,11 +362,11 @@ class Zend_Config_Yaml extends Zend_Config
         $value = trim($value);
 
         // remove quotes from string.
-        if ('"' == $value['0']) {
-            if ('"' == $value[count($value) -1]) {
+        if ('"' == substr($value, 0, 1)) {
+            if ('"' == substr($value, -1)) {
                 $value = substr($value, 1, -1);
             }
-        } elseif ('\'' == $value['0'] && '\'' == $value[count($value) -1]) {
+        } elseif ('\'' == substr($value, 0, 1) && '\'' == substr($value, -1)) {
             $value = strtr($value, array("''" => "'", "'" => ''));
         }