Php Uncaught Error Cannot Use String Offset Astro