fix writer for false values not separated by komma
This commit is contained in:
parent
849b35a72a
commit
50cc1130e2
1 changed files with 3 additions and 3 deletions
|
|
@ -81,8 +81,8 @@ class SettingsWriter
|
|||
|
||||
foreach ($settings as $key => $value)
|
||||
{
|
||||
if (!is_numeric($key)) $key = "'$key'";
|
||||
fwrite( $this->handle, "$indent$key =>" );
|
||||
$stringKey = (is_numeric($key)) ? $key : "'$key'";
|
||||
fwrite( $this->handle, "$indent$stringKey =>" );
|
||||
|
||||
// recursive walk through child arrays
|
||||
if ( is_array( $value ) )
|
||||
|
|
@ -105,7 +105,7 @@ class SettingsWriter
|
|||
fwrite( $this->handle, " $value" );
|
||||
}
|
||||
|
||||
if ( next($settings) )
|
||||
if ( array_key_last($settings) !== $key )
|
||||
{
|
||||
fwrite( $this->handle, "," );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue