fix Ditto for php5.4
@0d17bd99bc