diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-10-20 11:30:51 -0700 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-10-20 11:30:51 -0700 |
commit | d9529222b05d3366179c8a5bbd6d717664b98de0 (patch) | |
tree | 7789b8bc9ee9405f0ce33ff19dad5d15fb9b6207 /inc/common.php | |
parent | 9f5b9cf15569babaa90f0d6f3dd58cefd5439bc5 (diff) | |
parent | e07886c01389351f28a254ef6f7c9611453508fb (diff) | |
download | rpg-d9529222b05d3366179c8a5bbd6d717664b98de0.tar.gz rpg-d9529222b05d3366179c8a5bbd6d717664b98de0.tar.bz2 |
Merge pull request #380 from splitbrain/phpstrict
Php strict
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/common.php b/inc/common.php index 866e0aadd..32771285b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -64,7 +64,7 @@ function getSecurityToken() { */ function checkSecurityToken($token = null) { global $INPUT; - if(!$_SERVER['REMOTE_USER']) return true; // no logged in user, no need for a check + if(empty($_SERVER['REMOTE_USER'])) return true; // no logged in user, no need for a check if(is_null($token)) $token = $INPUT->str('sectok'); if(getSecurityToken() != $token) { @@ -474,13 +474,13 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) if(is_array($more)) { // add token for resized images - if($more['w'] || $more['h'] || $isexternalimage){ + if(!empty($more['w']) || !empty($more['h']) || $isexternalimage){ $more['tok'] = media_get_token($id,$more['w'],$more['h']); } // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); - if(!$more['w']) unset($more['w']); - if(!$more['h']) unset($more['h']); + if(empty($more['w'])) unset($more['w']); + if(empty($more['h'])) unset($more['h']); if(isset($more['id']) && $direct) unset($more['id']); $more = buildURLparams($more, $sep); } else { |