Fix PHP errors relating to using string offset as an array
Merge pull request #378 from phil-lavin/bugfix-php-errors

Fix PHP errors relating to using string offset as an array