# HG changeset patch # User Matti Hamalainen # Date 1678625892 -7200 # Node ID a157aa18ec75e18e13acb5ffdd104370a730e1b9 # Parent a00a1507f4c4f90573c7322fdd72e4a658dbc0d2 get_resource_type() works differently in PHP 8, and it's not actually needed here anyway, so remove its use for compatibility. diff -r a00a1507f4c4 -r a157aa18ec75 tools/makegmaps.php --- a/tools/makegmaps.php Sun Mar 20 12:35:42 2022 +0200 +++ b/tools/makegmaps.php Sun Mar 12 14:58:12 2023 +0200 @@ -711,7 +711,7 @@ if ($zoom < 9) { $im = imagecreate($tileDim, $tileDim); - if ($im === false || get_resource_type($im) != "gd") + if ($im === false) die("\nCould not create GD image resource open dim=".$tileDim. " for zoom=".$zoom.", continent=".$cname."\n"); @@ -724,9 +724,6 @@ $im = imagecreatefrompng($inFilename); if ($im === false) die("\nCould not open '".$inFilename."'.\n"); - - if (get_resource_type($im) != "gd") - die("Not an GD image resource ".$im." in '".$inFilename."'\n"); } } @@ -805,8 +802,7 @@ { $mapFile = $cfg["pathImageCache"].$cname."_".$zoom2.".png"; $mapData[$cname] = imagecreatefrompng($mapFile); - if ($mapData[$cname] === FALSE || - get_resource_type($mapData[$cname]) != "gd") + if ($mapData[$cname] === false) die("Not an GD image resource ".$mapData[$cname]." in '".$mapFile."'\n"); $tmp = filemtime($mapFile);