summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-01 14:23:21 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-01-01 14:23:21 +0100
commit9099dbd9614b37b48818ac24e2020b0d756b7e1e (patch)
tree5bd37e9e2bf937d3a8e480ff40a1c2063922d4a6 /ext/gd
parent12ce73a5bb5554f45950b6bcf85100f0b2db960e (diff)
downloadphp-git-9099dbd9614b37b48818ac24e2020b0d756b7e1e.tar.gz
Use RETURN_THROWS() after zend_type_error()
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/gd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 60c38b6207..9714f3bc38 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -3902,7 +3902,7 @@ PHP_FUNCTION(imageaffine)
break;
default:
zend_type_error("Invalid type for element %i", i);
- return;
+ RETURN_THROWS();
}
}
}
@@ -3976,7 +3976,7 @@ PHP_FUNCTION(imageaffinematrixget)
double x, y;
if (!options || Z_TYPE_P(options) != IS_ARRAY) {
zend_type_error("Array expected as options when using translate or scale");
- return;
+ RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) {
@@ -4008,7 +4008,7 @@ PHP_FUNCTION(imageaffinematrixget)
if (!options) {
zend_type_error("Number is expected as option when using rotate or shear");
- return;
+ RETURN_THROWS();
}
angle = zval_get_double(options);
@@ -4074,7 +4074,7 @@ PHP_FUNCTION(imageaffinematrixconcat)
break;
default:
zend_type_error("Matrix 1 contains invalid type for element %i", i);
- return;
+ RETURN_THROWS();
}
}
@@ -4091,7 +4091,7 @@ PHP_FUNCTION(imageaffinematrixconcat)
break;
default:
zend_type_error("Matrix 2 contains invalid type for element %i", i);
- return;
+ RETURN_THROWS();
}
}
}
@@ -4285,7 +4285,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
} else if (Z_TYPE_P(to_zval) == IS_STRING) {
if (CHECK_ZVAL_NULL_PATH(to_zval)) {
zend_type_error("Invalid 2nd parameter, filename must not contain null bytes");
- return;
+ RETURN_THROWS();
}
stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);