Jak poprawić 4 błędy, które się pojawiają wraz z nową wersją XAMPP, który posiada nową wersję PHP 5.4.4
Warning: Creating default object from empty value in C:\xampp\htdocs\Sklep_jubilerski\core\classes\controller_base.php on line 13
Warning: Creating default object from empty value in C:\xampp\htdocs\Sklep_jubilerski\core\classes\controller_base.php on line 17
Warning: Creating default object from empty value in C:\xampp\htdocs\Sklep_jubilerski\core\classes\router.php on line 118
Warning: Creating default object from empty value in C:\xampp\htdocs\Sklep_jubilerski\core\classes\router.php on line 131
plik controller_base.php:
<?php Abstract Class Controller_Base { protected $registry; function __construct($registry, $models, $addons, $layout, $controller) { $this->registry = $registry; $this->session = $registry->session; $this->error = $registry->error; $this->text = $registry->text; $this->router = $registry->router; $this->template = $registry->template; $this->db = $registry->db; foreach($models as $model){ $this->model->$model = $registry->model->$model; } if($addons) foreach($addons as $addon){ $this->addon->$addon = $registry->addon->$addon; } $this->template->layout = $layout; $this->here = $controller; } abstract function index($args=null,$post=null); function addon($addon){ return 'http://'.server_addr.site_addr.'core/addons/'.$addon; } } ?>
plik router.php:
-linia 118:
$this->registry->addon->$addon = $addon2;
oraz linia 131:
$this->registry->model->$name = $model;
Proszę o pomoc.