summaryrefslogtreecommitdiff
path: root/Lib/php/php.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/php/php.swg')
-rw-r--r--Lib/php/php.swg8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/php/php.swg b/Lib/php/php.swg
index afa047ef6..8b5fb7be3 100644
--- a/Lib/php/php.swg
+++ b/Lib/php/php.swg
@@ -93,10 +93,12 @@
%typemap(directorout) SWIGTYPE ($&1_ltype tmp)
{
- if(SWIG_ConvertPtr($input, (void **) &tmp, $&1_descriptor, 0) < 0 || tmp == NULL) {
- SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");
+ /* If exit was via exception, PHP NULL is returned so skip the conversion. */
+ if (!EG(exception)) {
+ if(SWIG_ConvertPtr($input, (void **) &tmp, $&1_descriptor, 0) < 0 || tmp == NULL)
+ SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");
+ $result = *tmp;
}
- $result = *tmp;
}
%typemap(in) SWIGTYPE *,