Fixed a bug with PHP array