Bug #9580   fix for php5.4

http://tracker.modx.com/issues/9580