From 49f4d132530d24c4907772d75419c94cb6aef173 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 8 Dec 2016 16:19:33 +0100 Subject: Make static/object context check PHP 7.1 compatible --- it_mail.class | 2 +- it_url.class | 2 +- 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']) -- cgit v1.2.3