summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2016-12-08 16:19:33 +0100
committerChristian Schneider2016-12-08 16:19:33 +0100
commit49f4d132530d24c4907772d75419c94cb6aef173 (patch)
treed87effbb7e6d568a5945b0caf549d26fcb24e57c
parent6a1b94db8794ac5c9ae8eaf452a7e6bf53b71e3c (diff)
downloaditools-49f4d132530d24c4907772d75419c94cb6aef173.tar.gz
itools-49f4d132530d24c4907772d75419c94cb6aef173.tar.bz2
itools-49f4d132530d24c4907772d75419c94cb6aef173.zip
Make static/object context check PHP 7.1 compatible
-rw-r--r--it_mail.class2
-rw-r--r--it_url.class2
2 files changed, 2 insertions, 2 deletions
diff --git a/it_mail.class b/it_mail.class
index 6da381c..ea63aba 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -444,7 +444,7 @@ function check_email($email, $checkmailbox = true)
$from = "itools@" . (($domain = it::match('[^.]*\.(.+)', getenv('ULTRAHOSTNAME') ? getenv('ULTRAHOSTNAME') : it::exec('hostname -f 2>/dev/null || hostname 2>/dev/null'))) ? $domain : "gna.ch");
/* Determine domain and email for test, skip if called as it_mail::check_email() */
- if (is_object($this))
+ if (isset($this) && is_object($this))
{
for ($i = 0; $i < count($this->header_names); $i++)
{
diff --git a/it_url.class b/it_url.class
index 8152efe..b78aa0f 100644
--- a/it_url.class
+++ b/it_url.class
@@ -114,7 +114,7 @@ function get($p=null, $timeout=5)
if (($filter = EDC('req')) && ($filter == 1 || strstr($p['url'], "/$filter.")))
ED($p['url']);
- if ($this instanceof it_url)
+ if (isset($this) && $this instanceof it_url)
{
$url = $this;
if ($p['url'])