Use next_cursor_str to avoid large number mangling, closes #1633
Resolve PHP Warning, closes #1634