I have following setup.
index.php
require_once "common.php";
...
common.php
...
$obj = new MyClass;
require_once "config.php"
...
config.php
...
require_once "settings.php";
...
settings.php
$obj->dostuff = true;
...
When i open index.php i get: Strict Standards: Creating default object from empty value in settings.php on 3
If i put $obj->dostuff = true; inside config.php it does not produce error message.
Can someone explain why i get this error? I am not asking how to fix it just understand why.
EDIT: My bad i had 2 config.php classes for each part of site and i only changed something in one of them leaving old include order in another now it works fine after it all loads in correct order.
obj->dostuff?$obj->dostuff = true;MyClass$obj->dostuff = true;into settings.php that's the goal. in config.php wherever i place it i dont see strict standards error.