Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy throws E_NOTICE errors #1

Open
giles-v opened this issue Apr 21, 2010 · 0 comments
Open

Proxy throws E_NOTICE errors #1

giles-v opened this issue Apr 21, 2010 · 0 comments

Comments

@giles-v
Copy link

giles-v commented Apr 21, 2010

Steps to reproduce:

  • Set up PHP to error_reporting E_ALL
  • Use the proxy to request a page (not using 'send_session' or 'user_agent' GET params)
  • Observe output

Expected result:

  • Output will be free of PHP errors

Actual result:

  • E_NOTICE errors are thrown from lines 172 and 184, and pollute the response.

Suggested fix: use "if (!empty($var))" instead of "if ($var)" to avoid throwing errors if the variables are undefined. There are probably a few more of these in the code too, these were the only I observed with my settings.

benkaiser added a commit to benkaiser/php-simple-proxy that referenced this issue Feb 3, 2015
Change all UNDEFINED notices to not trigger (use array_key_exists instead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant