Skip to content

Commit

Permalink
fixed 'Uninitialized string offset: 0' error
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 31, 2015
1 parent a8a41ba commit 8836fc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function convert($value, $options = null)
return (int) $value;
}

if ($options & self::STRIP_QUOTES) {
if (($options & self::STRIP_QUOTES) && !empty($value)) {
return self::stripQuotes($value);
}

Expand Down
1 change: 1 addition & 0 deletions tests/ConversionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class ConversionTest extends PHPUnit_Framework_TestCase
public function dataProvider()
{
return array(
array('', null, ''),
array('false', null, false),
array('FALSE', null, false),
array('true', null, true),
Expand Down

0 comments on commit 8836fc5

Please sign in to comment.