mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
fixed C ext
This commit is contained in:
+7
-1
@@ -870,6 +870,8 @@ PHP_FUNCTION(twig_template_get_attributes)
|
||||
|
||||
if (null === $object) {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on a null variable', $item);
|
||||
} elseif (is_array($object)) {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
|
||||
} else {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
|
||||
}
|
||||
@@ -887,7 +889,11 @@ PHP_FUNCTION(twig_template_get_attributes)
|
||||
if (Z_TYPE_P(object) == IS_NULL) {
|
||||
convert_to_string_ex(&object);
|
||||
|
||||
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a %s variable.", item, type_name);
|
||||
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a null variable.", item);
|
||||
} else if (Z_TYPE_P(object) == IS_ARRAY) {
|
||||
convert_to_string_ex(&object);
|
||||
|
||||
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on an array.", item);
|
||||
} else {
|
||||
convert_to_string_ex(&object);
|
||||
|
||||
|
||||
@@ -569,7 +569,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
if (null === $object) {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
|
||||
} elseif (is_array($object)) {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
|
||||
} else {
|
||||
$message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, gettype($object), $object);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user