Fix some PHP 7.0 syntax errors

This commit is contained in:
Benjamin Renard 2020-05-25 12:18:06 +02:00
parent 534295d4f3
commit 4feec44639
2 changed files with 2 additions and 2 deletions

View file

@ -144,7 +144,7 @@ class LSrelation extends LSlog_staticLoggerClass {
// Check if it's a simple relation
if ($this -> linkAttribute && $this -> linkAttributeValue) {
// Check linkAttribute refered to an existing related object type attribute
if (!$this -> LSobject :: hasAttr($this -> linkAttribute)) {
if (!call_user_func(array($this -> LSobject, 'hasAttr'), $this -> linkAttribute)) {
LSerror :: addErrorCode(
'LSrelations_08',
array(

View file

@ -449,7 +449,7 @@ class LSselect extends LSlog_staticLoggerClass {
$editableAttr = self :: getConfig($id, "LSobjects.".$obj->type.".editableAttr");
if (!$editableAttr)
return true;
if ($editableAttr && $obj->type :: hasAttr($editableAttr)) {
if ($editableAttr && call_user_func(array($obj->type, 'hasAttr'), $editableAttr)) {
return (LSsession::canEdit($obj->type, $obj->dn, $editableAttr))?1:0;
}
return false;