summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/gd.c8
-rw-r--r--ext/gd/tests/imagecreate_error.phpt4
-rw-r--r--ext/gd/tests/imagecreatetruecolor_error2.phpt4
3 files changed, 8 insertions, 8 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index b0215386d9..608f350c2f 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -829,12 +829,12 @@ PHP_FUNCTION(imagecreatetruecolor)
}
if (x_size <= 0 || x_size >= INT_MAX) {
- zend_throw_error(NULL, "Invalid width (x_size)");
+ zend_value_error("Invalid width (x_size)");
return;
}
if (y_size <= 0 || y_size >= INT_MAX) {
- zend_throw_error(NULL, "Invalid height (y_size)");
+ zend_value_error("Invalid height (y_size)");
return;
}
@@ -1473,12 +1473,12 @@ PHP_FUNCTION(imagecreate)
}
if (x_size <= 0 || x_size >= INT_MAX) {
- zend_throw_error(NULL, "Invalid width (x_size)");
+ zend_value_error("Invalid width (x_size)");
return;
}
if (y_size <= 0 || y_size >= INT_MAX) {
- zend_throw_error(NULL, "Invalid height (y_size)");
+ zend_value_error("Invalid height (y_size)");
return;
}
diff --git a/ext/gd/tests/imagecreate_error.phpt b/ext/gd/tests/imagecreate_error.phpt
index 127c43ec57..9fd8679c13 100644
--- a/ext/gd/tests/imagecreate_error.phpt
+++ b/ext/gd/tests/imagecreate_error.phpt
@@ -17,5 +17,5 @@ trycatch_dump(
?>
--EXPECT--
-!! [Error] Invalid width (x_size)
-!! [Error] Invalid height (y_size)
+!! [ValueError] Invalid width (x_size)
+!! [ValueError] Invalid height (y_size)
diff --git a/ext/gd/tests/imagecreatetruecolor_error2.phpt b/ext/gd/tests/imagecreatetruecolor_error2.phpt
index 55252533b3..e2784b1530 100644
--- a/ext/gd/tests/imagecreatetruecolor_error2.phpt
+++ b/ext/gd/tests/imagecreatetruecolor_error2.phpt
@@ -19,5 +19,5 @@ trycatch_dump(
?>
--EXPECT--
-!! [Error] Invalid width (x_size)
-!! [Error] Invalid height (y_size)
+!! [ValueError] Invalid width (x_size)
+!! [ValueError] Invalid height (y_size)