fix of #509, related to php 5.3
Merge pull request #515 from mariroz/dev

fix of #509, related to php 5.3