aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Oep.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-11-02 18:32:52 +0000
committerMario <mario@mariovavti.com>2022-11-02 18:32:52 +0000
commit2650a647e95beb3d6f4324ec9db7488d4562ba42 (patch)
treed26e53342be4dbdc11e8a5529e9fb88ca651e423 /Zotlabs/Module/Oep.php
parent331126916239b1ecad48faa24a8e961cffa6e69f (diff)
downloadvolse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.tar.gz
volse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.tar.bz2
volse-hubzilla-2650a647e95beb3d6f4324ec9db7488d4562ba42.zip
php warnings
Diffstat (limited to 'Zotlabs/Module/Oep.php')
-rw-r--r--Zotlabs/Module/Oep.php36
1 files changed, 18 insertions, 18 deletions
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];