#261797 by Pancho. E_ALL fixes: ensuring that vars are declared as new stdClass() before being used as classless objects. Also some scattered bugfixes here and there.