From 7ca289edd0d568a51dfdf225a5ef0e9663c38838 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 20 Oct 2022 19:25:01 +0000 Subject: fix php warnings --- include/photo/photo_driver.php | 1 + include/taxonomy.php | 2 +- include/text.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 14408ea50..0b691b457 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -77,6 +77,7 @@ function guess_image_type($filename, $data = '') { $type = null; $m = null; + $headers = ''; $ph = photo_factory(''); $types = $ph->supportedTypes(); diff --git a/include/taxonomy.php b/include/taxonomy.php index 88be43464..1eded055a 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -555,7 +555,7 @@ function dir_tagblock($link,$r) { $o = ''; if(! $r) - $r = App::$data['directory_keywords']; + $r = App::$data['directory_keywords'] ?? []; if($r) { $o = '

' . t('Keywords') . '

'; diff --git a/include/text.php b/include/text.php index 220844fd1..d0092912b 100644 --- a/include/text.php +++ b/include/text.php @@ -2206,6 +2206,8 @@ function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null, $x['application/x-php'] = t('PHP'); } + $options = ''; + foreach($x as $y => $z) { $selected = (($y == $current) ? ' selected="selected" ' : ''); $options .= ''; -- cgit v1.2.3