-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Encapsulate require_once to avoid name space bleedind #11634
Conversation
👍 - THAT'S a bad bug. @karlitschek We should backport this IMHO. |
Fixes the issue. Thanks for debugging this so fast. You're fantastic @PVince81 :) 👍 |
Thanks to you @MorrisJobke for providing the debug case 😄 |
* | ||
* @param string $app app name | ||
*/ | ||
private static function doLoadApp($app) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I propose a different method name?
requireAppFile
The script required by require_once might use variable names like $app which will conflict with the code that follows. This fix encapsulates require_once into its own function to avoid such issues.
16a3d9e
to
27c22f0
Compare
@DeepDiver1975 renamed as requested. |
thanks a lot! |
🚀 Test PASSed. 🚀 |
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11634 of commit 27c22f0 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@3 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11634/merge^{commit} # timeout=10Checking out Revision cc0d1712d8b7d18cf482882de050b7b084fc005d (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f cc0d1712d8b7d18cf482882de050b7b084fc005d > git rev-list 8523d9d6861a04290bf8938c225c963977b20c5e # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 6 second💣 Test FAILed. 💣 |
Unrelated => merge. |
Encapsulate require_once to avoid name space bleedind
Great fix. 👍 Please backport. |
The inspection completed: 1 updated code elements |
stable7 9998861 |
Hi all. For the noob, where does this script get placed in the file system? General installation steps? |
Steps:
This will apply the patch to your install. Let me know if that worked. |
Just applied the patch. Thanks for the instructions! Here is the output I received after running the command: sudo patch -p1 < 9998861.patch Unfortunately it appears the Windows client is still experiencing the problem. An internal error number 1060 happened. 500 Internal Server Error. Tried restarting Apache service first, then restarted the server. Same result. Error log:
Content of remote.php file:
|
@actyler555 yes, so it did not fix the getFileInfo issue. |
The script required by require_once might use variable names like $app
which will conflict with the code that follows.
This fix encapsulates require_once into its own function to avoid such
issues.
Fixes #11553
Please review/test @MorrisJobke @DeepDiver1975 @mmattel @kedanli