diff options
author | Mario <mario@mariovavti.com> | 2022-11-02 18:32:52 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-11-02 18:32:52 +0000 |
commit | 2650a647e95beb3d6f4324ec9db7488d4562ba42 (patch) | |
tree | d26e53342be4dbdc11e8a5529e9fb88ca651e423 /Zotlabs | |
parent | 331126916239b1ecad48faa24a8e961cffa6e69f (diff) | |
download | volse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.tar.gz volse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.tar.bz2 volse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.zip |
php warnings
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Oep.php | 36 | ||||
-rw-r--r-- | Zotlabs/Module/Register.php | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index cbb614429..6a6e1c0e2 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1920,7 +1920,7 @@ class Libzot { // preserve conversations with which you are involved from expiration - $stored = (($item_result && $item_result['item']) ? $item_result['item'] : false); + $stored = ((isset($item_result['item'])) ? $item_result['item'] : false); if ((is_array($stored)) && ($stored['id'] != $stored['parent']) && ($stored['author_xchan'] === $channel['channel_hash'])) { retain_item($stored['item']['parent']); diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index 8e048a487..d3ef05e16 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -15,7 +15,7 @@ class Oep extends \Zotlabs\Web\Controller { logger('oep: ' . print_r($_REQUEST,true), LOGGER_DEBUG, LOG_INFO); $html = ((argc() > 1 && argv(1) === 'html') ? true : false); - if($_REQUEST['url']) { + if(isset($_REQUEST['url'])) { $_REQUEST['url'] = strip_zids($_REQUEST['url']); $url = $_REQUEST['url']; } @@ -23,9 +23,9 @@ class Oep extends \Zotlabs\Web\Controller { if(! $url) http_status_exit(404, 'Not found'); - $maxwidth = $_REQUEST['maxwidth']; - $maxheight = $_REQUEST['maxheight']; - $format = $_REQUEST['format']; + $maxwidth = $_REQUEST['maxwidth'] ?? 0; + $maxheight = $_REQUEST['maxheight'] ?? 0; + $format = $_REQUEST['format'] ?? ''; if($format && $format !== 'json') http_status_exit(501, 'Not implemented'); @@ -70,8 +70,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = array(); $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('#//(.*?)/display/(.*?)(&|\?|$)#',$url,$matches)) { $res = $matches[2]; @@ -159,8 +159,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = []; $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('#//(.*?)/cards/(.*?)/(.*?)(&|\?|$)#',$url,$matches)) { $nick = $matches[2]; @@ -246,8 +246,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = []; $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('#//(.*?)/articles/(.*?)/(.*?)(&|\?|$)#',$url,$matches)) { $nick = $matches[2]; @@ -333,8 +333,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = array(); $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('#//(.*?)/(.*?)/(.*?)/(.*?)mid\=(.*?)(&|$)#',$url,$matches)) { $chn = $matches[3]; @@ -454,8 +454,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = array(); $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('|//(.*?)/(.*?)/(.*?)/album/|',$url,$matches)) { $chn = $matches[3]; @@ -519,8 +519,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = array(); $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('|//(.*?)/(.*?)/(.*?)$|',$url,$matches)) { $chn = $matches[3]; @@ -582,8 +582,8 @@ class Oep extends \Zotlabs\Web\Controller { $ret = array(); $url = $args['url']; - $maxwidth = intval($args['maxwidth']); - $maxheight = intval($args['maxheight']); + $maxwidth = ((isset($args['maxwidth'])) ? $args['maxwidth'] : 0); + $maxheight = ((isset($args['maxheight'])) ? $args['maxheight'] : 0); if(preg_match('|//(.*?)/(.*?)/(.*?)/image/|',$url,$matches)) { $chn = $matches[3]; diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index 0d423e0cd..5a50b4de0 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -26,7 +26,7 @@ class Register extends Controller { // created a channel, we'll try to revive the connection request // and process it. - if($_REQUEST['connect']) + if(isset($_REQUEST['connect'])) $_SESSION['connect'] = $_REQUEST['connect']; switch($cmd) { |