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
[OJS3] PHP warnings for incompatible function declarations #4672
Comments
@MarHerUMR, we have a long-standing issue with our codebase (which is quite mature) needing adaptation as new releases of PHP become stricter about coding conventions. Previously we had an error handler that discarded many of these warnings (this was necessary because we supported both PHP4 and PHP5, which had incompatible and different conventions) but that has since been removed. OJS 3.1.2 actually generates far fewer warnings than previous releases -- but there are some. They are cosmetic but you'll need to make sure that you direct errors/warnings to the log rather than the browser (this is recommended for production use of PHP). Our intention is to fix these gradually in the Contributions are welcome on this too :) |
Some more that regularly pop up in our log: PHP Warning: Declaration of RegistrationHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in lib/pkp/pages/user/RegistrationHandler.inc.php on line 19 PHP Warning: Declaration of RegistrationForm::validate() should be compatible with Form::validate($callHooks = true) in lib/pkp/classes/user/form/RegistrationForm.inc.php on line 21 PHP Warning: Declaration of JournalOAI::sets($offset, $limit, &$total) should be compatible with OAI::sets($offset, &$total) in classes/oai/ojs/JournalOAI.inc.php on line 22 PHP Warning: Declaration of PiwikSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /usr/local/service/www/ojs/plugins/generic/piwik/PiwikSettingsForm.inc.php on line 0 PHP Warning: Declaration of OJSPermissionSettingsForm::fetch($request, $params = NULL) should be compatible with PermissionSettingsForm::fetch($request, $template = NULL, $display = false, $params = NULL) in controllers/tab/settings/permissions/form/OJSPermissionSettingsForm.inc.php on line 18 PHP Warning: Declaration of SubmissionMetadataViewForm::fetch($request) should be compatible with PKPSubmissionMetadataViewForm::fetch($request, $template = NULL, $display = false) in PHP Warning: Declaration of SubmissionSubjectEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in lib/pkp/classes/submission/SubmissionSubjectEntryDAO.inc.php on line 20 PHP Warning: Declaration of SubmissionDisciplineEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in lib/pkp/classes/submission/SubmissionDisciplineEntryDAO.inc.php on line 0 PHP Warning: Declaration of SubmissionAgencyEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in lib/pkp/classes/submission/SubmissionAgencyEntryDAO.inc.php on line 0 PHP Warning: Declaration of SubmissionLanguageEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in lib/pkp/classes/submission/SubmissionLanguageEntryDAO.inc.php on line 0 |
@mpbraendle, what version of OJS are you seeing these with? |
Sorry, @asmecher . OJS 3.1.2-1 |
Many of these will already have been fixed in the |
Thanks. Will take those over and apply a patch. |
Thanks, @mpbraendle! OJS 3.1.2 already complains a lot less than previous releases, and OJS 3.2 will be much better still. Sometime soon I hope to add a no-warning policy on our automated testing set-up so we'll be free and clear of these once and for all (if there ever was such a thing). |
Since the update to
3.1.2
I got several PHP warnings. I can't really say if this have any consequences for the functionality of OJS but at least it is polluting the log files.I went through my log files, so here are all the warnings I could find:
The text was updated successfully, but these errors were encountered: