mirror of
https://github.com/php/php-src.git
synced 2025-01-23 20:23:31 +08:00
RFC: Deprecate png2wbmp() and jpegwbmp()
See <https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp>.
This commit is contained in:
parent
2bd34885da
commit
1490446ce0
@ -4085,6 +4085,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
|
||||
zend_long ignore_warning;
|
||||
#endif
|
||||
|
||||
php_error_docref(NULL, E_DEPRECATED, "This function is deprecated");
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
@ -32,8 +32,12 @@ jpeg2wbmp($file, $file2, 20, 120, 9);
|
||||
jpeg2wbmp($file, $file2, 20, 120, -1);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Invalid threshold value '9' in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Invalid threshold value '-1' in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -20,10 +20,16 @@ jpeg2wbmp(null, $file, 20, 120, 8);
|
||||
jpeg2wbmp(false, $file, 20, 120, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -20,10 +20,16 @@ jpeg2wbmp(null, $file, 20, 120, 8);
|
||||
jpeg2wbmp(false, $file, 20, 120, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -32,10 +32,16 @@ jpeg2wbmp($file, null, 20, 120, 8);
|
||||
jpeg2wbmp($file, false, 20, 120, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
|
||||
Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -32,8 +32,12 @@ png2wbmp($file, $file2, 20, 120, 9);
|
||||
png2wbmp($file, $file2, 20, 120, -1);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Invalid threshold value '9' in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -32,8 +32,12 @@ png2wbmp($file, $file2, 20, 120, 9);
|
||||
png2wbmp($file, $file2, 20, 120, -1);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Invalid threshold value '9' in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -20,10 +20,16 @@ png2wbmp(null, $file, 20, 120, 8);
|
||||
png2wbmp(false, $file, 20, 120, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
@ -32,10 +32,16 @@ png2wbmp($file, null, 20, 120, 8);
|
||||
png2wbmp($file, false, 20, 120, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
|
||||
Deprecated: png2wbmp(): This function is deprecated in %s on line %d
|
||||
|
||||
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user