php 5.4 Warning: Creating default object from empty value