summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Schneider2021-02-09 06:41:48 +0100
committerChristian Schneider2021-02-09 06:41:48 +0100
commit44134583ff8d4a9ed971c4ea6863a2589487ac4a (patch)
treedd5c43e1c56534ca7200ef1e8eee6b5b49c0d976 /it.class
parent3fa1ec73007a71fdb577365312c593724592aa17 (diff)
downloaditools-44134583ff8d4a9ed971c4ea6863a2589487ac4a.tar.gz
itools-44134583ff8d4a9ed971c4ea6863a2589487ac4a.tar.bz2
itools-44134583ff8d4a9ed971c4ea6863a2589487ac4a.zip
Avoid TypeError with null on PHP 8
Diffstat (limited to 'it.class')
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 6f49195..e713d0f 100644
--- a/it.class
+++ b/it.class
@@ -771,7 +771,7 @@ static function imageconvert($p)
{
if (!(($imagetype = @exif_imagetype($p['in'])) && ($type = image_type_to_extension($imagetype, false))))
{
- if (@get_class(it_xml::create(it::fopen($p['in'], "r"), array('prefix' => "_imageconvert_", 'safety' => 0))) == "_imageconvert_svg")
+ if (get_class((object)it_xml::create(it::fopen($p['in'], "r"), array('prefix' => "_imageconvert_", 'safety' => 0))) == "_imageconvert_svg")
$type = "svg"; # Accept SVG files if they are valid XML and root tag is svg
else
list(, $type) = explode(' ', strtolower(it::exec('identify 2>/dev/null {in}', $p))); # for things like eps