small fixes for php 5.5 and up

Signed-off-by: portamx <support@portamx.com>