Skip to content

Commit

Permalink
Fixes #4203 Fatal error Object of class core_index_index_controller c…
Browse files Browse the repository at this point in the history
…ould not be converted to string under PHP 7.4.7
  • Loading branch information
CaMer0n committed Jun 27, 2020
1 parent a6a98a8 commit 84d3c29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e107_core/controllers/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class core_index_index_controller extends eController
* - http://mysite.com/news.php?extend.2 (redirect)
* - http://mysite.com/Blog/My Blog Title.html (redirect)
* - http://NotMysite.com/someurl/ (redirect) - really not sure who'd need that...
* @throws eException
*/
public function actionIndex()
{
Expand Down Expand Up @@ -66,9 +67,9 @@ public function actionIndex()
elseif (USER)
{ // This is the key bit - what to do for a 'normal' logged in user
// We have USERCLASS_LIST - comma separated. Also e_CLASS_REGEXP
$inclass = false;
foreach ($class_list as $fp_class)
{
$inclass = false;
if (!$inclass && check_class($fp_class['userclass_id']))
{
$location = $pref['frontpage'][$fp_class['userclass_id']];
Expand All @@ -85,7 +86,7 @@ public function actionIndex()

$location = trim($location);
$request = $this->getRequest();

// Defaults to news
if(!$location) $location = 'url:/news';
// Former Welcome Message front-page. Should be handled by current theme layout
Expand Down Expand Up @@ -159,7 +160,7 @@ public function actionIndex()
$request->routed = true;
define('e_FRONTPAGE', true);
eFront::isLegacy('{e_BASE}'.$page);
return $this;
return;
}
// Redirect
else
Expand Down

0 comments on commit 84d3c29

Please sign in to comment.