From a1d2e39356f5ed0a613c8e0e5bfeb5f08124f2d1 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 31 Aug 2023 13:55:21 +0800 Subject: [PATCH] * Fix error for Passing null to parameter of type string is deprecated. --- module/mail/model.php | 2 +- module/story/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/mail/model.php b/module/mail/model.php index d402cedc5b..950ad3c2ca 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -354,7 +354,7 @@ class mailModel extends model if($this->config->mail->mta == 'smtp') $this->mta->smtpClose(); /* save errors. */ - if($this->isError()) $this->app->saveError('E_MAIL', join(' ', $this->errors), __FILE__, __LINE__, true); + if($this->isError()) $this->app->saveError(E_WARNING, join(' ', $this->errors), __FILE__, __LINE__); $message = ob_get_contents(); ob_end_clean(); diff --git a/module/story/control.php b/module/story/control.php index 7c871031ab..f30ba157cd 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -299,7 +299,7 @@ class story extends control $product = $this->product->getById(($productID and array_key_exists($productID, $products)) ? $productID : key($products)); $productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID, 'noclosed|withMain') : array(); $branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array(); - $branch = key($branches); + $branch = (int)key($branches); } else {