aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-09-11 18:26:27 +0000
committerMario <mario@mariovavti.com>2022-09-11 18:26:27 +0000
commitb55f314d7ee1c1cc00f13a8602a56780e1db71ae (patch)
tree27cd1247df54fcc651152ec7f23aa39f862d1a85 /include/photo
parent480862d7143f291658b48e785eda2e61a438a74b (diff)
downloadvolse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.tar.gz
volse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.tar.bz2
volse-hubzilla-b55f314d7ee1c1cc00f13a8602a56780e1db71ae.zip
php8: fix warnings
Diffstat (limited to 'include/photo')
-rw-r--r--include/photo/photo_driver.php8
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;
}