I dunno if you've called a protected variable directly outside the class. , but when I check the code
Looks like the error is from those lines ( as you said from your post above )
PHP Code:
public function registerPackage($name)
{
array_unshift($this->_registeredPackages, $name);
}
It will be helpful to solve problem together if you can post your codes here.