diff --git a/.travis.yml b/.travis.yml index 1284d21..30fbdac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,6 @@ php: - 5.2 - 5.3 - 5.4 +branches: + except: + - php-52 diff --git a/composer.json b/composer.json index 50c4f00..1db0317 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Handlebars processor for php", "homepage": "https://github.com/XaminProject/handlebars.php", "type": "library", - "license": "GPLv3", + "license": "MIT", "authors": [ { "name": "fzerorubigd", diff --git a/src/Handlebars/Context.php b/src/Handlebars/Context.php index 46efc7e..87181c2 100755 --- a/src/Handlebars/Context.php +++ b/src/Handlebars/Context.php @@ -229,7 +229,7 @@ public function get($variableName, $strict = false) private function _findVariableInContext($variable, $inside, $strict = false) { $value = ''; - if ( empty( $inside ) || ( $inside == 'this' ) ) { + if (($inside !== '0' && empty($inside)) || ($inside == 'this')) { return $variable; } elseif (is_array($variable)) { if (isset($variable[$inside])) {