Php 1093 refactor cursor logic

Since we're no longer checking for an exception here, would it be wise to `RETURN_NULL`?