fix for php 5.4
Merge branch 'master' into nicraM