Fix php strict resource ID conversion bug