diff options
author | Mario <mario@mariovavti.com> | 2022-09-11 18:26:27 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-09-11 18:26:27 +0000 |
commit | b55f314d7ee1c1cc00f13a8602a56780e1db71ae (patch) | |
tree | 27cd1247df54fcc651152ec7f23aa39f862d1a85 /include | |
parent | 480862d7143f291658b48e785eda2e61a438a74b (diff) | |
download | volse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.tar.gz volse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.tar.bz2 volse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.zip |
php8: fix warnings
Diffstat (limited to 'include')
-rw-r--r-- | include/photo/photo_driver.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index b7ace4f37..3fced76f2 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -85,6 +85,10 @@ function guess_image_type($filename, $data = '') { $hdrs = []; $h = explode("\n", $headers); foreach ($h as $l) { + if (strpos($l, ':') === false) { + continue; + } + list($k, $v) = array_map('trim', explode(':', trim($l), 2)); $hdrs[strtolower($k)] = $v; } @@ -251,6 +255,10 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) { $hdrs = []; $h = explode("\n", $result['header']); foreach ($h as $l) { + if (strpos($l, ':') === false) { + continue; + } + list($t,$v) = array_map("trim", explode(":", trim($l), 2)); $hdrs[strtolower($t)] = $v; } |