diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-03-08 15:51:47 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-03-08 15:51:47 +0100 |
commit | d27c0c1701c342ed9d6553163a71ac5cd7314a9f (patch) | |
tree | f565a5dd36cceba6abd63a74941caa719e749c5d /inc/media.php | |
parent | 9b50ec5c405ff215dd0d67491752f3c56ce7749e (diff) | |
parent | 49f299d6a332f8755f3b7a20c414702cca9c5ab8 (diff) | |
download | rpg-d27c0c1701c342ed9d6553163a71ac5cd7314a9f.tar.gz rpg-d27c0c1701c342ed9d6553163a71ac5cd7314a9f.tar.bz2 |
Merge pull request #588 from splitbrain/purge_E_ALL
Purge error log messages to support use of E_ALL
Diffstat (limited to 'inc/media.php')
-rw-r--r-- | inc/media.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/media.php b/inc/media.php index 4fff95d94..dc76521c6 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1018,7 +1018,7 @@ function media_file_tags($meta) { foreach($fields as $key => $tag){ $t = array(); if (!empty($tag[0])) $t = array($tag[0]); - if(is_array($tag[3])) $t = array_merge($t,$tag[3]); + if(isset($tag[3]) && is_array($tag[3])) $t = array_merge($t,$tag[3]); $value = media_getTag($t, $meta); $tags[] = array('tag' => $tag, 'value' => $value); } @@ -1779,7 +1779,7 @@ function media_nstree_item($item){ global $INPUT; $pos = strrpos($item['id'], ':'); $label = substr($item['id'], $pos > 0 ? $pos + 1 : 0); - if(!$item['label']) $item['label'] = $label; + if(empty($item['label'])) $item['label'] = $label; $ret = ''; if (!($INPUT->str('do') == 'media')) @@ -1841,7 +1841,7 @@ function media_resize_image($file, $ext, $w, $h=0){ if( $mtime > filemtime($file) || media_resize_imageIM($ext,$file,$info[0],$info[1],$local,$w,$h) || media_resize_imageGD($ext,$file,$info[0],$info[1],$local,$w,$h) ){ - if($conf['fperm']) @chmod($local, $conf['fperm']); + if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']); return $local; } //still here? resizing failed @@ -1902,7 +1902,7 @@ function media_crop_image($file, $ext, $w, $h=0){ if( $mtime > @filemtime($file) || media_crop_imageIM($ext,$file,$info[0],$info[1],$local,$cw,$ch,$cx,$cy) || media_resize_imageGD($ext,$file,$cw,$ch,$local,$cw,$ch,$cx,$cy) ){ - if($conf['fperm']) @chmod($local, $conf['fperm']); + if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']); return media_resize_image($local,$ext, $w, $h); } |