Fixed string lengths

This commit is contained in:
Dmitry Stogov committed 2014-03-05 16:04:28 +04:00
1 parent 7320abbaa9
commit da75df6faa
1 file changed
+4 -4
+4 -4
View File
@@ -4760,10 +4760,10 @@ PHP_FUNCTION(error_get_last)
if (PG(last_error_message)) {
array_init(return_value);
add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1);
add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 );
add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno));
add_assoc_long_ex(return_value, "type", sizeof("type")-1, PG(last_error_type));
add_assoc_string_ex(return_value, "message", sizeof("message")-1, PG(last_error_message), 1);
add_assoc_string_ex(return_value, "file", sizeof("file")-1, PG(last_error_file)?PG(last_error_file):"-", 1 );
add_assoc_long_ex(return_value, "line", sizeof("line")-1, PG(last_error_lineno));
}
}
/* }}} */