compatibility fix for php 5.4
Merge pull request #213 from will123195/master

sky3 compatibility