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

Suppress Warnings from realpath() if SAFE MODE is enabled #10

Closed
wants to merge 1 commit into from

Conversation

fl4p
Copy link

@fl4p fl4p commented Mar 12, 2014

Suppress warnings like:
Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is X is not allowed to access /tmp owned by uid 0 in .../getid3.php on line 22

@JamesHeinrich
Copy link
Owner

I'd prefer to avoid the warning by skipping realpath in safe mode rather than suppressing the warning. Alternate change made in e174958

JamesHeinrich referenced this pull request Mar 12, 2014
Avoid warnings from realpath() if SAFE MODE is enabled
@fl4p
Copy link
Author

fl4p commented Mar 13, 2014

I know suppressing with @ is ugly, but in this case it makes sense it think. Its not easy to test if realpath() will actually fail. realpath() still works if the path is in open_basedir.

JamesHeinrich added a commit that referenced this pull request Mar 13, 2014
@JamesHeinrich
Copy link
Owner

Maybe you're right. I'll take the ugly approach.

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

Successfully merging this pull request may close these issues.

None yet

2 participants