Fixes a PHP 5.4 exception in strtr()

The `String::insert()` was receiving an object in the `$data` argument
which was causing a problem with `strtr()`.

I started getting this after an upgrade to 5.4.19.