PHP 8.1 fixes; fixed adding users

This commit is contained in:
Frank Schubert
2022-08-09 16:08:04 +02:00
parent e055181e9f
commit 31241f79cf
60 changed files with 85 additions and 57 deletions
+2
View File
@@ -253,6 +253,8 @@ class FronkDB {
if(!is_array($fields)) {
$fields=preg_split('/ ?, ?/',$fields);
}
$fstr = "";
foreach($fields as $f)
{
+4
View File
@@ -58,6 +58,10 @@ class mfBaseModel {
}
public function load($row) {
if(!is_object($this->data)) {
$this->data = new stdClass();
}
foreach($row as $field => $value) {
if($this->fieldprefix) {
if(preg_match('/^'.$this->fieldprefix.'_(.+)$/',$field,$m)) {
+4 -4
View File
@@ -31,7 +31,7 @@ class mfRouter {
if(defined("DEFAULT_ROUTE") && strlen(DEFAULT_ROUTE)) {
$defroute=explode("_",DEFAULT_ROUTE);
$this->default['mod']=$defroute[0];
if($defroute[1]) {
if(count($defroute) == 2 && $defroute[1]) {
$this->default['action']=$defroute[1];
}
@@ -49,9 +49,9 @@ class mfRouter {
// get mod and action
if(preg_match('/^([^_]+)(?:_(.+)?)?$/',$request['action'],$m)) {
$umod = $m[1];
$this->mod=$m[1];
$this->action="Index";
if($m[2]) {
$this->mod = $m[1];
$this->action = "Index";
if(count($m) == 3 && $m[2]) {
$uaction = $m[2];
$this->action=$m[2];
}
+1 -1
View File
@@ -5,7 +5,7 @@ class mfUser extends mfBaseModel {
public $data;
public function __construct() {
public function __construct($_ = null) {
$this->db=FronkDB::singleton();
$this->log=mfLoghandler::singleton();