Skip to content

Commit da75df6

Browse files
committed
Fixed string lengths
1 parent 7320abb commit da75df6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/standard/basic_functions.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4760,10 +4760,10 @@ PHP_FUNCTION(error_get_last)
47604760

47614761
if (PG(last_error_message)) {
47624762
array_init(return_value);
4763-
add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
4764-
add_assoc_string_ex(return_value, "message", sizeof("message"), PG(last_error_message), 1);
4765-
add_assoc_string_ex(return_value, "file", sizeof("file"), PG(last_error_file)?PG(last_error_file):"-", 1 );
4766-
add_assoc_long_ex(return_value, "line", sizeof("line"), PG(last_error_lineno));
4763+
add_assoc_long_ex(return_value, "type", sizeof("type")-1, PG(last_error_type));
4764+
add_assoc_string_ex(return_value, "message", sizeof("message")-1, PG(last_error_message), 1);
4765+
add_assoc_string_ex(return_value, "file", sizeof("file")-1, PG(last_error_file)?PG(last_error_file):"-", 1 );
4766+
add_assoc_long_ex(return_value, "line", sizeof("line")-1, PG(last_error_lineno));
47674767
}
47684768
}
47694769
/* }}} */

0 commit comments

Comments
 (0)