mirror of
				https://github.com/Mibew/handlebars.php.git
				synced 2025-11-04 12:05:09 +03:00 
			
		
		
		
	Update Context.php
Should return null instead of an empty string when context is not found. Handlebars.js returns undefined, which makes it possible to distict an empty string and not existing. (should not affect existing use, because null is handeled the same way as empty string)
This commit is contained in:
		
							parent
							
								
									c6f3e0fd5e
								
							
						
					
					
						commit
						122a8a9d7b
					
				@ -253,7 +253,7 @@ class Context
 | 
			
		||||
     */
 | 
			
		||||
    private function _findVariableInContext($variable, $inside, $strict = false)
 | 
			
		||||
    {
 | 
			
		||||
        $value = '';
 | 
			
		||||
        $value = null;
 | 
			
		||||
        if (($inside !== '0' && empty($inside)) || ($inside == 'this')) {
 | 
			
		||||
            return $variable;
 | 
			
		||||
        } elseif (is_array($variable)) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user