I think if you update line 53 from:
if (strpos($Redirect_redirStr, "?") < 0) {
to
if (strpos($Redirect_redirStr, "?") === false) {
it should fix the issue. I'm not sure what is adding that to the end of the url, but that should make it so it doesn't break the page.