Replace is_object with explicit instance test

This commit is contained in:
MDW 2024-03-19 23:04:27 +01:00
parent fd6f4a4f41
commit 3b74d09942
No known key found for this signature in database

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2009-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -96,7 +97,7 @@ class ActionsStripeconnect extends CommonHookActions
$this->resprints .= $langs->trans("NoStripe");
}
$this->resprints .= '</td></tr>';
} elseif (is_object($object) && $object->element == 'member') {
} elseif ($object instanceof CommonObject && $object->element == 'member') {
$this->resprints .= '<tr><td>';
$this->resprints .= '<table width="100%" class="nobordernopadding"><tr><td>';
$this->resprints .= $langs->trans('StripeCustomer');
@ -130,7 +131,7 @@ class ActionsStripeconnect extends CommonHookActions
$this->resprints .= $langs->trans("NoStripe");
}
$this->resprints .= '</td></tr>';
} elseif (is_object($object) && $object->element == 'adherent_type') {
} elseif ($object instanceof CommonObject && $object->element == 'adherent_type') {
$this->resprints .= '<tr><td>';
$this->resprints .= '<table width="100%" class="nobordernopadding"><tr><td>';
$this->resprints .= $langs->trans('PlanStripe');