Skip to content

Set unused/unnecessary argument as optional - #3811

Open
randallbrenes wants to merge 1 commit into
Studio-42:masterfrom
randallbrenes:feature/optional-third-searchMatchName-argument
Open

randallbrenes wants to merge 1 commit into
Studio-42:masterfrom
randallbrenes:feature/optional-third-searchMatchName-argument

Conversation

@randallbrenes

Copy link
Copy Markdown

Some plugins, such as File Manager Advanced, only pass 2 arguments—since the third one is not used—but this causes an error in recent versions of PHP. Making this third argument optional resolves the issue, and it also ensures there are no compatibility problems if a plugin happens to provide that third parameter.

Error on server to avoid:
AFM elFinder connector error: Too few arguments to function elFinderVolumeDriver::searchMatchName(), 2 passed in .../public_html/wp-content/plugins/file-manager-advanced/application/class_fma_local_filesystem.php on line 230 and exactly 3 expected

* @return bool @return bool
*/
protected function searchMatchName($name, $query, $path)
protected function searchMatchName($name, $query, $path = null)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual change, all other are made by php linter

This branch has not been deployed

No deployments
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.

1 participant