diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-15 11:27:29 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-17 14:52:46 +0100 |
commit | d1764ca33018f1f2e4a05926c879c67ad4aa8da5 (patch) | |
tree | 443cab099d2d5989a93a8102f599b51d36acc64e /ext/gd | |
parent | 117b18d22d14fb6a597b3cd6d52e75cef2d088bb (diff) | |
download | php-git-d1764ca33018f1f2e4a05926c879c67ad4aa8da5.tar.gz |
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
Diffstat (limited to 'ext/gd')
-rw-r--r-- | ext/gd/gd_compat.c | 4 | ||||
-rw-r--r-- | ext/gd/libgd/gd_security.c | 4 | ||||
-rw-r--r-- | ext/gd/libgd/gd_tga.c | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gd_xbm.c | 2 | ||||
-rw-r--r-- | ext/gd/tests/001-mb.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/001.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug66356.phpt | 4 | ||||
-rw-r--r-- | ext/gd/tests/bug72339.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug77269.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug77272.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug77479.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug77973.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/createfromwbmp2.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/createfromwbmp2_extern.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/imageloadfont_error2.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/imageloadfont_invalid.phpt | 2 | ||||
-rw-r--r-- | ext/gd/tests/libgd00101.phpt | 2 |
17 files changed, 20 insertions, 20 deletions
diff --git a/ext/gd/gd_compat.c b/ext/gd/gd_compat.c index 448275b168..51692c47a4 100644 --- a/ext/gd/gd_compat.c +++ b/ext/gd/gd_compat.c @@ -11,11 +11,11 @@ int overflow2(int a, int b) { if(a <= 0 || b <= 0) { - php_error_docref(NULL, E_WARNING, "one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); + php_error_docref(NULL, E_WARNING, "One parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); return 1; } if(a > INT_MAX / b) { - php_error_docref(NULL, E_WARNING, "product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); + php_error_docref(NULL, E_WARNING, "Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); return 1; } return 0; diff --git a/ext/gd/libgd/gd_security.c b/ext/gd/libgd/gd_security.c index 2a7d4a032a..438a564ff1 100644 --- a/ext/gd/libgd/gd_security.c +++ b/ext/gd/libgd/gd_security.c @@ -21,11 +21,11 @@ int overflow2(int a, int b) { if(a <= 0 || b <= 0) { - gd_error("one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); + gd_error("One parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); return 1; } if(a > INT_MAX / b) { - gd_error("product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); + gd_error("Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); return 1; } return 0; diff --git a/ext/gd/libgd/gd_tga.c b/ext/gd/libgd/gd_tga.c index 7328163f2c..125a698f24 100644 --- a/ext/gd/libgd/gd_tga.c +++ b/ext/gd/libgd/gd_tga.c @@ -149,7 +149,7 @@ int read_header_tga(gdIOCtx *ctx, oTga *tga) unsigned char header[18]; if (gdGetBuf(header, sizeof(header), ctx) < 18) { - gd_error("fail to read header"); + gd_error("Fail to read header"); return -1; } diff --git a/ext/gd/libgd/gd_xbm.c b/ext/gd/libgd/gd_xbm.c index dabdf0a38f..0be7c2352b 100644 --- a/ext/gd/libgd/gd_xbm.c +++ b/ext/gd/libgd/gd_xbm.c @@ -135,7 +135,7 @@ gdImagePtr gdImageCreateFromXbm(FILE * fd) h[3] = ch; } if (sscanf(h, "%x", &b) != 1) { - gd_error("invalid XBM"); + gd_error("Invalid XBM"); gdImageDestroy(im); return 0; } diff --git a/ext/gd/tests/001-mb.phpt b/ext/gd/tests/001-mb.phpt index 8ee2e9a415..c34c232d0a 100644 --- a/ext/gd/tests/001-mb.phpt +++ b/ext/gd/tests/001-mb.phpt @@ -17,7 +17,7 @@ var_dump(imagecreatefrompng($file)); echo "Done\n"; ?> --EXPECTF-- -Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): failed to open stream: No such file or directory in %s on line %d +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 diff --git a/ext/gd/tests/001.phpt b/ext/gd/tests/001.phpt index b820ac1cc0..75dbcc0d47 100644 --- a/ext/gd/tests/001.phpt +++ b/ext/gd/tests/001.phpt @@ -17,7 +17,7 @@ var_dump(imagecreatefrompng($file)); echo "Done\n"; ?> --EXPECTF-- -Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on line %d +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 diff --git a/ext/gd/tests/bug66356.phpt b/ext/gd/tests/bug66356.phpt index 0e13bca9b3..a255997ca0 100644 --- a/ext/gd/tests/bug66356.phpt +++ b/ext/gd/tests/bug66356.phpt @@ -40,7 +40,7 @@ Array [height] => 10 ) -Warning: imagecrop(): one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully +Warning: imagecrop(): One parameter to a memory allocation multiplication is negative or zero, failing operation gracefully in %s on line %d bool(false) object(GdImage)#2 (0) { @@ -48,6 +48,6 @@ object(GdImage)#2 (0) { object(GdImage)#2 (0) { } -Warning: imagecrop(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +Warning: imagecrop(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %s on line %d bool(false) diff --git a/ext/gd/tests/bug72339.phpt b/ext/gd/tests/bug72339.phpt index d63ce67c55..5b5fdb6ee6 100644 --- a/ext/gd/tests/bug72339.phpt +++ b/ext/gd/tests/bug72339.phpt @@ -32,7 +32,7 @@ unlink($fname); ?> --EXPECTF-- -Warning: imagecreatefromgd2(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +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 diff --git a/ext/gd/tests/bug77269.phpt b/ext/gd/tests/bug77269.phpt index 6a426a2aa0..2bd5758e1a 100644 --- a/ext/gd/tests/bug77269.phpt +++ b/ext/gd/tests/bug77269.phpt @@ -14,5 +14,5 @@ imagescale($im, 1, 1, IMG_TRIANGLE); ?> --EXPECTF-- -Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +Warning: imagescale():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %s on line %d diff --git a/ext/gd/tests/bug77272.phpt b/ext/gd/tests/bug77272.phpt index f2d1c90a6d..678333f06c 100644 --- a/ext/gd/tests/bug77272.phpt +++ b/ext/gd/tests/bug77272.phpt @@ -14,6 +14,6 @@ $img = imagecreate(2**28, 1); var_dump(imagescale($img, 1, 1, IMG_TRIANGLE)); ?> --EXPECTF-- -Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +Warning: imagescale():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %s on line %d bool(false) diff --git a/ext/gd/tests/bug77479.phpt b/ext/gd/tests/bug77479.phpt index 855d511992..e57da56439 100644 --- a/ext/gd/tests/bug77479.phpt +++ b/ext/gd/tests/bug77479.phpt @@ -14,7 +14,7 @@ imagecolorallocate($im, 0, 0, 0); imagewbmp($im, __DIR__ . '/77479.wbmp'); ?> --EXPECTF-- -Warning: imagewbmp():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +Warning: imagewbmp():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %s on line %d Warning: imagewbmp(): Could not create WBMP in %s on line %d diff --git a/ext/gd/tests/bug77973.phpt b/ext/gd/tests/bug77973.phpt index 6a469a32c2..c9400987e0 100644 --- a/ext/gd/tests/bug77973.phpt +++ b/ext/gd/tests/bug77973.phpt @@ -14,7 +14,7 @@ $im = imagecreatefromxbm($filepath); var_dump($im); ?> --EXPECTF-- -Warning: imagecreatefromxbm(): invalid XBM in %s on line %d +Warning: imagecreatefromxbm(): Invalid XBM in %s on line %d Warning: imagecreatefromxbm(): '%s' is not a valid XBM file in %s on line %d bool(false) diff --git a/ext/gd/tests/createfromwbmp2.phpt b/ext/gd/tests/createfromwbmp2.phpt index e083b74c19..819795181a 100644 --- a/ext/gd/tests/createfromwbmp2.phpt +++ b/ext/gd/tests/createfromwbmp2.phpt @@ -42,7 +42,7 @@ $im = imagecreatefromwbmp($filename); unlink($filename); ?> --EXPECTF-- -Warning: imagecreatefromwbmp(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +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 diff --git a/ext/gd/tests/createfromwbmp2_extern.phpt b/ext/gd/tests/createfromwbmp2_extern.phpt index ed739461c4..0aff8d8b93 100644 --- a/ext/gd/tests/createfromwbmp2_extern.phpt +++ b/ext/gd/tests/createfromwbmp2_extern.phpt @@ -42,6 +42,6 @@ $im = imagecreatefromwbmp($filename); unlink($filename); ?> --EXPECTF-- -gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +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 diff --git a/ext/gd/tests/imageloadfont_error2.phpt b/ext/gd/tests/imageloadfont_error2.phpt index 262009f2cf..a4ad10839b 100644 --- a/ext/gd/tests/imageloadfont_error2.phpt +++ b/ext/gd/tests/imageloadfont_error2.phpt @@ -11,5 +11,5 @@ Austin Drouare <austin.drouare [at] gmail [dot] com> #testfest #tek11 var_dump( imageloadfont('\src\invalidfile.font') ); ?> --EXPECTF-- -Warning: imageloadfont(\src\invalidfile.font): failed to open stream: No such file or directory in %s on line %d +Warning: imageloadfont(\src\invalidfile.font): Failed to open stream: No such file or directory in %s on line %d bool(false) diff --git a/ext/gd/tests/imageloadfont_invalid.phpt b/ext/gd/tests/imageloadfont_invalid.phpt index ed9d9e3a30..0ef49da2a5 100644 --- a/ext/gd/tests/imageloadfont_invalid.phpt +++ b/ext/gd/tests/imageloadfont_invalid.phpt @@ -19,7 +19,7 @@ imagestring($image, $font, 0, 0, "Hello", $black); unlink($filename); ?> --EXPECTF-- -Warning: imageloadfont(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +Warning: imageloadfont(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %simageloadfont_invalid.php on line %d Warning: imageloadfont(): Error reading font, invalid font header in %simageloadfont_invalid.php on line %d diff --git a/ext/gd/tests/libgd00101.phpt b/ext/gd/tests/libgd00101.phpt index dbb1886171..7e1e4b5872 100644 --- a/ext/gd/tests/libgd00101.phpt +++ b/ext/gd/tests/libgd00101.phpt @@ -11,7 +11,7 @@ $im = imagecreatefromgd(__DIR__ . '/libgd00101.gd'); var_dump($im); ?> --EXPECTF-- -Warning: imagecreatefromgd(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully +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 |