mirror of
https://github.com/php/php-src.git
synced 2024-09-25 03:47:26 +00:00
Merge branch 'master' of https://git.php.net/repository/php-src
This commit is contained in:
commit
c234ca8e17
@ -114,9 +114,9 @@ If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
@ -1173,7 +1173,7 @@ case $libdir in
|
||||
libdir=$libdir/php
|
||||
;;
|
||||
esac
|
||||
case $datadir in
|
||||
case `eval echo $datadir` in
|
||||
'${prefix}/share')
|
||||
datadir=$datadir/php
|
||||
;;
|
||||
@ -1188,7 +1188,7 @@ old_libdir=$libdir
|
||||
old_datadir=$datadir
|
||||
exec_prefix=`eval echo $exec_prefix`
|
||||
libdir=`eval echo $libdir`
|
||||
datadir=`eval echo $datadir`
|
||||
datadir=`eval eval echo $datadir`
|
||||
|
||||
dnl Build extension directory path
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Bug #67248 (imageaffinematrixget missing check of parameters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available')}
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
if(!function_exists('imageaffinematrixget')) die('skip imageaffinematrixget() not available');
|
||||
?>
|
||||
--FILE--
|
||||
|
@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
Testing null byte injection in imagegd2
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
?>
|
||||
--CLEAN--
|
||||
$tempdir = sys_get_temp_dir(). '/php-gdtest';
|
||||
foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
|
@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
Testing null byte injection in imagegd
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
?>
|
||||
--CLEAN--
|
||||
$tempdir = sys_get_temp_dir(). '/php-gdtest';
|
||||
foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
|
@ -6,6 +6,7 @@ foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
rmdir($tempdir);
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
$support = gd_info();
|
||||
if (!isset($support['GIF Create Support']) || $support['GIF Create Support'] === false) {
|
||||
print 'skip gif support not available';
|
||||
|
@ -6,6 +6,7 @@ foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
rmdir($tempdir);
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
$support = gd_info();
|
||||
if (!isset($support['JPEG Support']) || $support['JPEG Support'] === false) {
|
||||
print 'skip jpeg support not available';
|
||||
|
22
ext/gd/tests/imagepalettetotruecolor_basic.phpt
Normal file
22
ext/gd/tests/imagepalettetotruecolor_basic.phpt
Normal file
@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
does the imagepalettetotruecollor function realy converts the image palette?
|
||||
--CREDITS--
|
||||
Carlos André Ferrari <caferrari [at] gmail [dot] com>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available.");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreate(100, 100);
|
||||
var_dump(is_resource($im));
|
||||
var_dump(imageistruecolor($im));
|
||||
var_dump(imagepalettetotruecolor($im));
|
||||
var_dump(imageistruecolor($im));
|
||||
imagedestroy($im);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
14
ext/gd/tests/imagepalettetotruecolor_error1.phpt
Normal file
14
ext/gd/tests/imagepalettetotruecolor_error1.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
imagepalettetotruecollor must return an error if no resource is given
|
||||
--CREDITS--
|
||||
Carlos André Ferrari <caferrari [at] gmail [dot] com>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available.");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
imagepalettetotruecolor();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: imagepalettetotruecolor() expects exactly 1 parameter, 0 given in %s on line %d
|
14
ext/gd/tests/imagepalettetotruecolor_error2.phpt
Normal file
14
ext/gd/tests/imagepalettetotruecolor_error2.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
imagepalettetotruecollor must return an error if not a resource is given
|
||||
--CREDITS--
|
||||
Carlos André Ferrari <caferrari [at] gmail [dot] com>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available.");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
imagepalettetotruecolor("bla");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: imagepalettetotruecolor() expects parameter 1 to be resource, string given in %s on line %d
|
15
ext/gd/tests/imagepalettetotruecolor_error3.phpt
Normal file
15
ext/gd/tests/imagepalettetotruecolor_error3.phpt
Normal file
@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
imagepalettetotruecollor must return an error if not an image resource is given
|
||||
--CREDITS--
|
||||
Carlos André Ferrari <caferrari [at] gmail [dot] com>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available.");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = fopen('php://memory', 'w');
|
||||
imagepalettetotruecolor($im);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: imagepalettetotruecolor(): supplied resource is not a valid Image resource in %s on line %d
|
@ -6,6 +6,7 @@ foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
rmdir($tempdir);
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
$support = gd_info();
|
||||
if (!isset($support['PNG Support']) || $support['PNG Support'] === false) {
|
||||
print 'skip png support not available';
|
||||
|
@ -6,6 +6,7 @@ foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
rmdir($tempdir);
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
$support = gd_info();
|
||||
if (!isset($support['WBMP Support']) || $support['WBMP Support'] === false) {
|
||||
print 'skip wbmp support not available';
|
||||
|
@ -6,6 +6,7 @@ foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
|
||||
rmdir($tempdir);
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
$support = gd_info();
|
||||
if (!isset($support['WEBP Support']) || $support['WEBP Support'] === false) {
|
||||
print 'skip webp support not available';
|
||||
|
@ -50,6 +50,7 @@
|
||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
(defined(__ppc__) && defined(__APPLE__)) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || \
|
||||
defined(__powerpc64__) || \
|
||||
defined(__mc68020__)
|
||||
#define PLATFORM_UNALIGNED_WORD_ACCESS
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user