Summary:
Module MicroTiny 2.2.5 corrections + compatible php 7.1.0 to 8.1.4
Detailed Description:
------------------------------------------------------------------------------
modules/MicroTiny/lib/class.microtiny_utils.php
L177 function _generate_config
return $tpl_ob->fetch();
return $result;
#---- remove last return
return $tpl_ob->fetch();
----------------------
##########
#-- make compatibility PHP versions from php 7.1.0 to 8.x.x : prevent compatible
notice
------------------------------------------------------------------------------
modules/MicroTiny/lib/class.microtiny_profile.php
L 19 : public function OffsetGet($key)
#-- correction : type output must be :mixed, but not defined in php 7.x, so
temporarily suppress the notice
#[\ReturnTypeWillChange]
public function OffsetGet($key)
#--L45 mixed type must return a value: so at the end of this function add :
return null if no case match OR $key is not set
default:
throw new CmsInvalidDataException('invalid key '.$key.' for '.__CLASS__.'
object');
}
}
#-- correction
default:
throw new CmsInvalidDataException('invalid key '.$key.' for '.__CLASS__.'
object');
}
return null;
}
-----
L 50
public function OffsetSet($key,$value)
#-- correction
public function OffsetSet($key,$value):void
L79
public function OffsetExists($key)
#-- correction
public function OffsetExists($key):bool
L95
default:
throw new CmsInvalidDataException('invalid key '.$key.' for '.__CLASS__.'
object');
}
}
#-- correction
default:
throw new CmsInvalidDataException('invalid key '.$key.' for '.__CLASS__.'
object');
}
return false;
}
L100
public function OffsetUnset($key)
#-- correction
public function OffsetUnset($key):void