Do not use function is_resource().
PHP 8.1 replaces some kind of resources by built-in class instances. As is_resource() is always used to test for failures, replace calls by simple Boolean checks.
This commit is contained in:
committed by
Deon George
parent
f129579f45
commit
b035e8a0f4
@@ -40,7 +40,7 @@ switch ($request['location']) {
|
||||
if (! isset($jpeg_data[$request['attr']][$request['index']])) {
|
||||
if (function_exists('imagecreate')) {
|
||||
$im = imagecreate(160,30);
|
||||
if (is_resource($im)) {
|
||||
if ($im) {
|
||||
header('Content-type: image/png');
|
||||
|
||||
# Set the background
|
||||
|
Reference in New Issue
Block a user