Thanks to visit codestin.com
Credit goes to github.com

Skip to content

is_executable warning exception #26473

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

Closed
wants to merge 1 commit into from
Closed

is_executable warning exception #26473

wants to merge 1 commit into from

Conversation

m3esma
Copy link

@m3esma m3esma commented Mar 9, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

is_executable warning exception
The @ gets rid of the warning when this command fails. is_executable(): open_basedir restriction in effect

e_warning

The @ gets rid of the warning when this command fails. `is_executable(): open_basedir restriction in effect`
@fabpot
Copy link
Member

fabpot commented Mar 10, 2018

I'm 👎 on this one. We try to avoid adding @ on function calls whenever possible. Here, it looks like you are using open_basedir, which means you need to take care of that on your side.

@fabpot fabpot closed this Mar 10, 2018
@m3esma
Copy link
Author

m3esma commented Mar 10, 2018

if (basename($path) == $name && @is_executable($path)) {

if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {

@fabpot
@ Very used in symfony!

@fabpot
Copy link
Member

fabpot commented Mar 10, 2018

I'm not saying we don't use @, but that we try to avoid using it whenever possible.

@m3esma
Copy link
Author

m3esma commented Mar 10, 2018

@fabpot
ok. thanks ♥, I'm trying to find a better way

@m3esma m3esma changed the title Fix is_executable warning exception [s] Fix is_executable warning exception Mar 13, 2018
@m3esma m3esma changed the title [s] Fix is_executable warning exception is_executable warning exception Mar 13, 2018
@pwronline
Copy link

@m3esma
Did you fix it? I have the same problem..

@m3esma
Copy link
Author

m3esma commented Apr 14, 2018

@pwronline
I personally solved it with this commit
6972e1e
And now everything is fine for me 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants