small fixes for php 5.5 and up

Signed-off-by: portamx <support@portamx.com>
fix for php 5.5 and up