Error thrown

Cannot use object of type stdClass as array