getInfo() and addChild() PHP error fix