summaryrefslogtreecommitdiff
path: root/Lib/php/utils.i
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/php/utils.i')
-rw-r--r--Lib/php/utils.i8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/php/utils.i b/Lib/php/utils.i
index 661a48777..facf54196 100644
--- a/Lib/php/utils.i
+++ b/Lib/php/utils.i
@@ -24,8 +24,12 @@
%enddef
%define CONVERT_STRING_IN(lvar,t,invar)
- convert_to_string_ex(invar);
- lvar = (t) Z_STRVAL_PP(invar);
+ if ((*invar)->type==IS_NULL) {
+ lvar = (t) 0;
+ } else {
+ convert_to_string_ex(invar);
+ lvar = (t) Z_STRVAL_PP(invar);
+ }
%enddef
%define %pass_by_val( TYPE, CONVERT_IN )