On Mountain Lion I can replicate this using MAMP set to php5.4, reverting to 5.2 and the error is gone, so temp fix may be to simply revert to older version of PHP. I haven;t tested 5.3 yet.
More