]> granicus.if.org Git - php/commitdiff
Promote warnings to exceptions in ext/gd
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 19 Aug 2020 21:27:53 +0000 (23:27 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 20 Aug 2020 10:07:04 +0000 (12:07 +0200)
Closes GH-6023

33 files changed:
ext/gd/gd.c
ext/gd/tests/001-mb.phpt
ext/gd/tests/001.phpt
ext/gd/tests/bug37346-mb.phpt
ext/gd/tests/bug37346.phpt
ext/gd/tests/bug37360.phpt
ext/gd/tests/bug38112.phpt
ext/gd/tests/bug39780.phpt
ext/gd/tests/bug39780_extern.phpt
ext/gd/tests/bug71912-mb.phpt
ext/gd/tests/bug71912.phpt
ext/gd/tests/bug72339.phpt
ext/gd/tests/bug73161.phpt
ext/gd/tests/bug73868.phpt
ext/gd/tests/bug73869.phpt
ext/gd/tests/bug75111.phpt
ext/gd/tests/bug75571.phpt
ext/gd/tests/bug77195.phpt
ext/gd/tests/bug77973.phpt
ext/gd/tests/colorclosest.phpt
ext/gd/tests/colormatch.phpt
ext/gd/tests/crafted_gd2.phpt
ext/gd/tests/createfromstring.phpt
ext/gd/tests/createfromwbmp2.phpt
ext/gd/tests/createfromwbmp2_extern.phpt
ext/gd/tests/imagecolormatch_error2.phpt
ext/gd/tests/imagecolormatch_error3.phpt
ext/gd/tests/imagecolormatch_error4.phpt
ext/gd/tests/libgd00086.phpt
ext/gd/tests/libgd00086_extern.phpt
ext/gd/tests/libgd00094-mb.phpt
ext/gd/tests/libgd00094.phpt
ext/gd/tests/libgd00101.phpt

index b015143ad80612298c5b290202ace681c228dfce..48dd6ecf4518fa4c22f9e3c706086ba38886a54b 100644 (file)
@@ -861,20 +861,20 @@ PHP_FUNCTION(imagecolormatch)
        result = gdImageColorMatch(im1, im2);
        switch (result) {
                case -1:
-                       php_error_docref(NULL, E_WARNING, "Image1 must be TrueColor" );
-                       RETURN_FALSE;
+                       zend_argument_value_error(1, "must be TrueColor");
+                       RETURN_THROWS();
                        break;
                case -2:
-                       php_error_docref(NULL, E_WARNING, "Image2 must be Palette" );
-                       RETURN_FALSE;
+                       zend_argument_value_error(2, "must be Palette");
+                       RETURN_THROWS();
                        break;
                case -3:
-                       php_error_docref(NULL, E_WARNING, "Image1 and Image2 must be the same size" );
-                       RETURN_FALSE;
+                       zend_argument_value_error(2, "must be the same size as argument #1 ($im1)");
+                       RETURN_THROWS();
                        break;
                case -4:
-                       php_error_docref(NULL, E_WARNING, "Image2 must have at least one color" );
-                       RETURN_FALSE;
+                       zend_argument_value_error(2, "must have at least one color");
+                       RETURN_THROWS();
                        break;
        }
 
@@ -1459,7 +1459,7 @@ gdImagePtr _php_image_create_from_string(zend_string *data, char *tn, gdImagePtr
 
        im = (*ioctx_func_p)(io_ctx);
        if (!im) {
-               php_error_docref(NULL, E_WARNING, "Passed data is not in '%s' format", tn);
+               php_error_docref(NULL, E_WARNING, "Passed data is not in \"%s\" format", tn);
                io_ctx->gd_free(io_ctx);
                return NULL;
        }
@@ -1483,8 +1483,8 @@ PHP_FUNCTION(imagecreatefromstring)
        }
 
        if (ZSTR_LEN(data) < sizeof(sig)) {
-               php_error_docref(NULL, E_WARNING, "Empty string or invalid image");
-               RETURN_FALSE;
+               zend_argument_value_error(1, "cannot be empty");
+               RETURN_THROWS();
        }
 
        memcpy(sig, ZSTR_VAL(data), sizeof(sig));
@@ -1666,7 +1666,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
                return;
        }
 
-       php_error_docref(NULL, E_WARNING, "'%s' is not a valid %s file", file, tn);
+       php_error_docref(NULL, E_WARNING, "\"%s\" is not a valid %s file", file, tn);
 out_err:
        php_stream_close(stream);
        RETURN_FALSE;
@@ -1806,7 +1806,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
 
                fp = VCWD_FOPEN(fn, "wb");
                if (!fp) {
-                       php_error_docref(NULL, E_WARNING, "Unable to open '%s' for writing", fn);
+                       php_error_docref(NULL, E_WARNING, "Unable to open \"%s\" for writing", fn);
                        RETURN_FALSE;
                }
 
@@ -2297,8 +2297,8 @@ PHP_FUNCTION(imagecolorsforindex)
                add_assoc_long(return_value,"blue", gdImageBlue(im,col));
                add_assoc_long(return_value,"alpha", gdImageAlpha(im,col));
        } else {
-               php_error_docref(NULL, E_WARNING, "Color index %d out of range", col);
-               RETURN_FALSE;
+               zend_argument_value_error(2, "is out of range");
+               RETURN_THROWS();
        }
 }
 /* }}} */
index c34c232d0ae706f76f1d930497dd49e6383c4b5c..38bf14a3cb808884a26806525464094ea71541ff 100644 (file)
@@ -20,6 +20,6 @@ echo "Done\n";
 Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): Failed to open stream: No such file or directory in %s on line %d
 bool(false)
 
-Warning: imagecreatefrompng(): '%s001私はガラスを食べられます.test' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): "%s001私はガラスを食べられます.test" is not a valid PNG file in %s on line %d
 bool(false)
 Done
index 75dbcc0d471a3057c23c5df680decc40e8e51ac8..d741e1f50618dd5830ef469a15096a9fad1e2302 100644 (file)
@@ -20,6 +20,6 @@ echo "Done\n";
 Warning: imagecreatefrompng(%s001.test): Failed to open stream: No such file or directory in %s on line %d
 bool(false)
 
-Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): "%s001.test" is not a valid PNG file in %s on line %d
 bool(false)
 Done
index 4ec5734fc7939cbcd41d41aeb3904378340dc275..e1a9b8b4706c9d9f2db2f0e7cb4f8119b54b0719 100644 (file)
@@ -9,4 +9,4 @@ Bug #37346 (gdimagecreatefromgif, bad colormap)
 $im = imagecreatefromgif(__DIR__ . '/bug37346私はガラスを食べられます.gif');
 ?>
 --EXPECTF--
-Warning: imagecreatefromgif(): '%sbug37346私はガラスを食べられます.gif' is not a valid GIF file in %sbug37346-mb.php on line %d
+Warning: imagecreatefromgif(): "%sbug37346私はガラスを食べられます.gif" is not a valid GIF file in %sbug37346-mb.php on line %d
index 57701a7ad7b757dc65ebd1e67495d0a2c78c320f..40b3341685daa6d306f1716ec30fc03c50307a4c 100644 (file)
@@ -9,4 +9,4 @@ Bug #37346 (gdimagecreatefromgif, bad colormap)
 $im = imagecreatefromgif(__DIR__ . '/bug37346.gif');
 ?>
 --EXPECTF--
-Warning: imagecreatefromgif(): '%sbug37346.gif' is not a valid GIF file in %sbug37346.php on line %d
+Warning: imagecreatefromgif(): "%sbug37346.gif" is not a valid GIF file in %sbug37346.php on line %d
index c2b8b9592dd7513792dbdb45cc6246782fdd492a..74a58223a96c0d18586a89dcfc3bb67d1927348b 100644 (file)
@@ -10,5 +10,5 @@ $im = imagecreatefromgif(__DIR__ . '/bug37360.gif');
 var_dump($im);
 ?>
 --EXPECTF--
-Warning: imagecreatefromgif(): '%s' is not a valid GIF file in %s on line %d
+Warning: imagecreatefromgif(): "%s" is not a valid GIF file in %s on line %d
 bool(false)
index 8a6911ad9da94e83cde777191dafde08aeb6ba8d..4eb553b6143845ced5e613cab0313f9d02bcbff8 100644 (file)
@@ -11,4 +11,4 @@ Bug #38112 (GIF Invalid Code size ).
 $im = imagecreatefromgif(__DIR__ . '/bug38112.gif');
 ?>
 --EXPECTF--
-Warning: imagecreatefromgif(): '%sbug38112.gif' is not a valid GIF file in %sbug38112.php on line %d
+Warning: imagecreatefromgif(): "%sbug38112.gif" is not a valid GIF file in %sbug38112.php on line %d
index 2a7af3e0f49828ad4d2661535eac7398557da807..6468f28b7342d7590c0debcdfdb847503e26e949 100644 (file)
@@ -16,5 +16,5 @@ Warning: imagecreatefrompng(): gd-png:  fatal libpng error: Read Error: truncate
 
 Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in %s on line %d
 
-Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): "%s" is not a valid PNG file in %s on line %d
 bool(false)
index 0656e52fc7df72b89744c2cca171d13ec26d6ccc..e09047731483135884aa21e0672fd43472d086f2 100644 (file)
@@ -14,5 +14,5 @@ var_dump($im);
 --EXPECTF--
 gd-png:  fatal libpng error: Read Error: truncated data
 gd-png error: setjmp returns error condition 2
-Warning: imagecreatefrompng(): '%sbug39780.png' is not a valid PNG file in /%s on line %d
+Warning: imagecreatefrompng(): v%sbug39780.png" is not a valid PNG file in /%s on line %d
 bool(false)
index d0bf3a89c235a4e307c4a452cfbccbb9e14b3b17..32a6ee00bc71bcebd49c725d14fc71903168aa16 100644 (file)
@@ -11,5 +11,5 @@ imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size私はガラ
 ?>
 OK
 --EXPECTF--
-Warning: imagecreatefromgd2(): '%s%einvalid_neg_size私はガラスを食べられます.gd2' is not a valid GD2 file in %s%ebug71912-mb.php on line %d
+Warning: imagecreatefromgd2(): "%s%einvalid_neg_size私はガラスを食べられます.gd2" is not a valid GD2 file in %s%ebug71912-mb.php on line %d
 OK
index ed4665f439a81720ddd35dd566a1bae4b8373a84..30bde45d214c537de86e5c4ec5b222716772c9ec 100644 (file)
@@ -14,5 +14,5 @@ imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
 ?>
 OK
 --EXPECTF--
-Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d
+Warning: imagecreatefromgd2(): "%s%einvalid_neg_size.gd2" is not a valid GD2 file in %s%ebug71912.php on line %d
 OK
index bd8054cced24b43622fd3e67a184ce99d4ed7dcb..4baaa92ab21e148643aeac948728ee07914be4ca 100644 (file)
@@ -35,4 +35,4 @@ unlink($fname);
 Warning: imagecreatefromgd2(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
  in %sbug72339.php on line %d
 
-Warning: imagecreatefromgd2(): '%sbug72339.gd' is not a valid GD2 file in %sbug72339.php on line %d
+Warning: imagecreatefromgd2(): "%sbug72339.gd" is not a valid GD2 file in %sbug72339.php on line %d
index bc386dc9c22ebd93e854f3c0c493b2a344cc0bcf..90fd26274556f58bf145ef97ff97f8fdf1648f4e 100644 (file)
@@ -12,5 +12,5 @@ $im = imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73161.gd2');
 var_dump($im);
 ?>
 --EXPECTF--
-Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
+Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
 bool(false)
index fd9537c4a017d5c1f88389c2318eaef47998b364..ed59ac7be3068e559d15095f47ed4aac57009750 100644 (file)
@@ -12,5 +12,5 @@ var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73868.gd2'));
 Warning: imagecreatefromgd2(): gd2: EOF while reading
  in %s on line %d
 
-Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
+Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
 bool(false)
index 69c7e1b5439024ea8500870b5e68c39daa329c99..6adb8c09a4fb10b01fe0e9404de0d156d446feae 100644 (file)
@@ -10,8 +10,8 @@ var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869a.gd2'));
 var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869b.gd2'));
 ?>
 --EXPECTF--
-Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
+Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
 bool(false)
 
-Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
+Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
 bool(false)
index 4ec22c4a3a17f8703b5e26a8748eb1ec07e49aa2..e2e13f3b73640ad87f8650f183494449e1c95a70 100644 (file)
@@ -17,7 +17,7 @@ $str .= hex2bin("01001800000000000000000000000000000000000000000000000000");
 var_dump(imagecreatefromstring($str));
 ?>
 --EXPECTF--
-Warning: imagecreatefromstring(): Passed data is not in 'BMP' format in %s on line %d
+Warning: imagecreatefromstring(): Passed data is not in "BMP" format in %s on line %d
 
 Warning: imagecreatefromstring(): Couldn't create GD Image Stream out of Data in %s on line %d
 bool(false)
index 10b459d421fea977faf3d9b263d12fb949961a76..898f1ecbad5c320485118156c3c1f2e6c9bfb5ce 100644 (file)
@@ -9,5 +9,5 @@ if (!extension_loaded('gd')) die('skip gd extension not available');
 var_dump(imagecreatefromgif(__DIR__ . '/bug75571.gif'));
 ?>
 --EXPECTF--
-Warning: imagecreatefromgif(): '%s' is not a valid GIF file in %s on line %d
+Warning: imagecreatefromgif(): "%s" is not a valid GIF file in %s on line %d
 bool(false)
index f90035b7416bef2f84dbff26217e58b46524099f..fc788a6667574b632640f4c0d01834140a960764 100644 (file)
@@ -14,4 +14,4 @@ imagecreatefromjpeg($filename);
 --EXPECTF--
 Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: JPEG datastream contains no image in %s on line %d
 
-Warning: imagecreatefromjpeg(): '%s' is not a valid JPEG file in %s on line %d
+Warning: imagecreatefromjpeg(): "%s" is not a valid JPEG file in %s on line %d
index c9400987e07a64c4ced99ed96f97f20f377394d1..434cc4449e1a4a48538b6a0208afda96c8319e87 100644 (file)
@@ -16,7 +16,7 @@ var_dump($im);
 --EXPECTF--
 Warning: imagecreatefromxbm(): Invalid XBM in %s on line %d
 
-Warning: imagecreatefromxbm(): '%s' is not a valid XBM file in %s on line %d
+Warning: imagecreatefromxbm(): "%s" is not a valid XBM file in %s on line %d
 bool(false)
 --CLEAN--
 <?php
index 3f588fbd598b76054a62335e88432b83c68798cc..8541151442a911f632d859ee19462a784bfb44f7 100644 (file)
@@ -14,7 +14,11 @@ imagedestroy($im);
 
 $im = imagecreate(5,5);
 $c = imagecolorclosest($im, 255,0,255);
-print_r(imagecolorsforindex($im, $c));
+try {
+  imagecolorsforindex($im, $c);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
 imagedestroy($im);
 
 $im = imagecreate(5,5);
@@ -48,7 +52,11 @@ imagedestroy($im);
 
 $im = imagecreate(5,5);
 $c = imagecolorclosestalpha($im, 255,0,255,100);
-print_r(imagecolorsforindex($im, $c));
+try {
+  imagecolorsforindex($im, $c);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
 imagedestroy($im);
 
 $im = imagecreate(5,5);
@@ -62,7 +70,6 @@ for ($i=0; $i<255; $i++) imagecolorresolvealpha($im, $i,0,0,1);
 $c = imagecolorclosestalpha($im, 255,0,0,1);
 print_r(imagecolorsforindex($im, $c));
 
-
 $im = imagecreate(5,5);
 for ($i=0; $i<256; $i++) {
     if ($i == 246) {
@@ -74,12 +81,10 @@ for ($i=0; $i<256; $i++) {
 $c = imagecolorclosestalpha($im, 255,10,10,1);
 print_r(imagecolorsforindex($im, $c));
 
-
 ?>
---EXPECTF--
+--EXPECT--
 FF00FF
-
-Warning: imagecolorsforindex(): Color index -1 out of range in %s on line %d
+imagecolorsforindex(): Argument #2 ($index) is out of range
 Array
 (
     [red] => 255
@@ -102,8 +107,7 @@ Array
     [alpha] => 0
 )
 64FF00FF
-
-Warning: imagecolorsforindex(): Color index -1 out of range in %s on line %d
+imagecolorsforindex(): Argument #2 ($index) is out of range
 Array
 (
     [red] => 255
index 283a2005719191156bb4a24c15de9bd4c064fbd9..5641bc01017feb4ec6131e5d4030e5a9cc57b910 100644 (file)
@@ -10,12 +10,16 @@ imagecolormatch
 $im = imagecreatetruecolor(5,5);
 $im2 = imagecreate(5,5);
 
-imagecolormatch($im, $im2);
+try {
+    imagecolormatch($im, $im2);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
 
 echo "ok\n";
 
 imagedestroy($im);
 ?>
---EXPECTF--
-Warning: imagecolormatch(): Image2 must have at least one color in %s on line %d
+--EXPECT--
+imagecolormatch(): Argument #2 ($im2) must have at least one color
 ok
index 60687dfa3c38a8ad760f4adfc4040fb507cf1f36..a5b0dfe339bba6b8c451be887338e887cf65351c 100644 (file)
@@ -11,4 +11,4 @@ Test max colors for a gd image.
 imagecreatefromgd(__DIR__ . '/crafted.gd2');
 ?>
 --EXPECTF--
-Warning: imagecreatefromgd(): '%scrafted.gd2' is not a valid GD file in %s on line %d
+Warning: imagecreatefromgd(): "%scrafted.gd2" is not a valid GD file in %s on line %d
index 5d14708a2ee32c28cd30b7e7d316a91438198d5a..d4d63149f13f1287f5e3a918128809a75cc12b56 100644 (file)
@@ -51,14 +51,17 @@ unlink($dir . '/p.png');
 
 
 //empty string
-$im = imagecreatefromstring('');
+try {
+    imagecreatefromstring('');
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
 //random string > 12
 $im = imagecreatefromstring(' asdf jklp foo');
 ?>
 --EXPECTF--
 createfromstring truecolor png: ok
 createfromstring palette png: ok
-
-Warning: imagecreatefromstring(): Empty string or invalid image in %screatefromstring.php on line %d
+imagecreatefromstring(): Argument #1 ($image) cannot be empty
 
 Warning: imagecreatefromstring(): Data is not in a recognized format in %screatefromstring.php on line %d
index f75d02613d3284e695f69c3b76fa6fe6e8976849..c6a1a22427d6a7cf4170f2e520351345491c4051 100644 (file)
@@ -45,4 +45,4 @@ unlink($filename);
 Warning: imagecreatefromwbmp(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
  in %s on line %d
 
-Warning: imagecreatefromwbmp(): '%s' is not a valid WBMP file in %s on line %d
+Warning: imagecreatefromwbmp(): "%s" is not a valid WBMP file in %s on line %d
index ad7a130c18df461a705a78732d70fa0536000649..ab15ec024e7e79f87c9b68761aa059489fa1e4ba 100644 (file)
@@ -44,4 +44,4 @@ unlink($filename);
 --EXPECTF--
 gd warning: Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
 
-Warning: imagecreatefromwbmp(): '%s_tmp.wbmp' is not a valid WBMP file in %s on line %d
+Warning: imagecreatefromwbmp(): "%s_tmp.wbmp" is not a valid WBMP file in %s on line %d
index 2240f987df5f2273b3617d0e44cb9a171fc8f21c..f356b716c6147f67f3a3183870fa9f0c9adf180c 100644 (file)
@@ -13,8 +13,13 @@ $ima = imagecreate(110, 20);
 $background_color = imagecolorallocate($ima, 0, 0, 0);
 $imb = imagecreate(110, 20);
 $background_color = imagecolorallocate($imb, 0, 0, 100);
-var_dump(imagecolormatch($ima, $imb));
+
+try {
+    imagecolormatch($ima, $imb);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
+
 ?>
---EXPECTF--
-Warning: imagecolormatch(): Image1 must be TrueColor in %s on line %d
-bool(false)
+--EXPECT--
+imagecolormatch(): Argument #1 ($im1) must be TrueColor
index 245ebca646d0328ce6b5343dd87b0d8b3b98acd1..a3f556a3e12bad02347718757b4944e65bb6890e 100644 (file)
@@ -13,8 +13,13 @@ $ima = imagecreatetruecolor(110, 20);
 $background_color = imagecolorallocate($ima, 0, 0, 0);
 $imb = imagecreatetruecolor(110, 20);
 $background_color = imagecolorallocate($imb, 0, 0, 100);
-var_dump(imagecolormatch($ima, $imb));
+
+try {
+    imagecolormatch($ima, $imb);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
+
 ?>
---EXPECTF--
-Warning: imagecolormatch(): Image2 must be Palette in %s on line %d
-bool(false)
+--EXPECT--
+imagecolormatch(): Argument #2 ($im2) must be Palette
index 4579192571a24093270413245223fedca89c5df9..f1392c9149e90553b50ce61fcdaeadc57c76010b 100644 (file)
@@ -13,8 +13,13 @@ $ima = imagecreatetruecolor(110, 20);
 $background_color = imagecolorallocate($ima, 0, 0, 0);
 $imb = imagecreate(100, 20);
 $background_color = imagecolorallocate($imb, 0, 0, 100);
-var_dump(imagecolormatch($ima, $imb));
+
+try {
+    imagecolormatch($ima, $imb);
+} catch (ValueError $exception) {
+    echo $exception->getMessage() . "\n";
+}
+
 ?>
---EXPECTF--
-Warning: imagecolormatch(): Image1 and Image2 must be the same size in %s on line %d
-bool(false)
+--EXPECT--
+imagecolormatch(): Argument #2 ($im2) must be the same size as argument #1 ($im1)
index c7954a0a002da11035a95f0285cda9e15ba26c22..959828f0685acb99e1716ef537034c8282c5ffdb 100644 (file)
@@ -16,5 +16,5 @@ Warning: imagecreatefrompng(): gd-png:  fatal libpng error: Read Error: truncate
 
 Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in %s on line %d
 
-Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): "%s" is not a valid PNG file in %s on line %d
 bool(false)
index 36b79b4835fb465c9da5799e29f4135a8afa1a55..78bafa761e88bb8b5aa0b324b8ea546f3dbc28bb 100644 (file)
@@ -15,5 +15,5 @@ var_dump($im);
 gd-png:  fatal libpng error: Read Error: truncated data
 gd-png error: setjmp returns error condition 1
 
-Warning: imagecreatefrompng(): '%slibgd00086.png' is not a valid PNG file in %s on line %d
+Warning: imagecreatefrompng(): "%slibgd00086.png" is not a valid PNG file in %s on line %d
 bool(false)
index 76b6bcd5663cf10f370b6eee0b9444ecb8c2cc82..7ce24a43b22c2e376ddccfc275532ec5a90bd5e5 100644 (file)
@@ -11,5 +11,5 @@ $im = imagecreatefromxbm(__DIR__ . '/libgd00094私はガラスを食べられま
 var_dump($im);
 ?>
 --EXPECTF--
-Warning: imagecreatefromxbm(): '%slibgd00094私はガラスを食べられます.xbm' is not a valid XBM file in %slibgd00094-mb.php on line %d
+Warning: imagecreatefromxbm(): "%slibgd00094私はガラスを食べられます.xbm" is not a valid XBM file in %slibgd00094-mb.php on line %d
 bool(false)
index 17c4df70d56da5610c4123b36374146be92ff8ab..8af0b342d97c07994f4ccc1f8770eb87bc01bd9b 100644 (file)
@@ -11,5 +11,5 @@ $im = imagecreatefromxbm(__DIR__ . '/libgd00094.xbm');
 var_dump($im);
 ?>
 --EXPECTF--
-Warning: imagecreatefromxbm(): '%slibgd00094.xbm' is not a valid XBM file in %slibgd00094.php on line %d
+Warning: imagecreatefromxbm(): "%slibgd00094.xbm" is not a valid XBM file in %slibgd00094.php on line %d
 bool(false)
index 7e1e4b587219cb8793e8b1f5a5b9791df473fcd3..d2e278ced9888a98703ee2a4d0904393a26b358d 100644 (file)
@@ -14,5 +14,5 @@ var_dump($im);
 Warning: imagecreatefromgd(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
  in %slibgd00101.php on line %d
 
-Warning: imagecreatefromgd(): '%slibgd00101.gd' is not a valid GD file in %slibgd00101.php on line %d
+Warning: imagecreatefromgd(): "%slibgd00101.gd" is not a valid GD file in %slibgd00101.php on line %d
 bool(false)