diff options
| author | 2013-12-28 18:07:16 +0100 | |
|---|---|---|
| committer | 2013-12-28 18:07:16 +0100 | |
| commit | 856d2c125b1592df0f98a141f3de599c5089ce02 (patch) | |
| tree | 3cc0552472dd44975823746dbf7e0adadc8de746 /lib/Minz/ModelArray.php | |
| parent | 01a1dd09a8ee02250905a80d2662bfe811c09f09 (diff) | |
Suite nettoyage des types et chaînes
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/260
Diffstat (limited to 'lib/Minz/ModelArray.php')
| -rw-r--r-- | lib/Minz/ModelArray.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php index bf2c4cb40..89d7f06c1 100644 --- a/lib/Minz/ModelArray.php +++ b/lib/Minz/ModelArray.php @@ -37,10 +37,8 @@ class Minz_ModelArray { if ($this->array === false) { throw new Minz_PermissionDeniedException($this->filename); - } elseif (is_array($this->array)) { - $this->array = $this->decodeArray($this->array); - } else { - $this->array = array (); + } elseif (!is_array($this->array)) { + $this->array = array(); } } } @@ -55,21 +53,6 @@ class Minz_ModelArray { return true; } - //TODO: check if still useful, and if yes, use a native function such as array_map - private function decodeArray ($array) { - $new_array = array (); - - foreach ($array as $key => $value) { - if (is_array ($value)) { - $new_array[$key] = $this->decodeArray ($value); - } else { - $new_array[$key] = stripslashes ($value); - } - } - - return $new_array; - } - private function getLock() { $handle = fopen($this->filename, 'r'); if ($handle === false) { |
