Fixing php warning see #6122