Fix a fatal

PHP Fatal error: Cannot access empty property