Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Using is_int() instead of is_numeric() to avoid unintentional loss of…
Browse files Browse the repository at this point in the history
… string keys
  • Loading branch information
michaelmoussa committed Oct 12, 2013
1 parent 99fa6cb commit 43bb44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Config/Writer/PhpArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function processIndented(array $config, array $array, &$indentLevel =

foreach ($config as $key => $value) {
$arrayString .= str_repeat(' ', $indentLevel);
$arrayString .= (is_numeric($key) ? $key : "'" . addslashes($key) . "'") . ' => ';
$arrayString .= (is_int($key) ? $key : "'" . addslashes($key) . "'") . ' => ';

if (is_array($value)) {
if ($value === array()) {
Expand Down

0 comments on commit 43bb44f

Please sign in to comment.