Hi to all! I saw that in my PHP log file there is this message:
[18-Dec-2017 15:47:32 Europe/Berlin] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /Applications/MAMP/htdocs/agro/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
Hi @asmecher, thanks, works, can you help me to get rid even the follow errors?
[19-Dec-2017 09:36:31 Europe/Berlin] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /Applications/MAMP/htdocs/agro/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 140
[19-Dec-2017 09:36:31 Europe/Berlin] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /Applications/MAMP/htdocs/agro/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 140
[19-Dec-2017 09:36:31 Europe/Berlin] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /Applications/MAMP/htdocs/agro/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 140
[19-Dec-2017 09:36:32 Europe/Berlin] PHP Strict Standards: Declaration of SubmissionFileDAO::fromRow() should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /Applications/MAMP/htdocs/agro/classes/article/SubmissionFileDAO.inc.php on line 23
In plugins/generic/customBlockManager, you can apply Resolve strict standards warning · pkp/customBlockManager@c564d60 · GitHub (this should resolve warnings about BlockPlugin::getEnabled). I’ll see if I can find a similarly quick resolution for the DAOSubmissionFile::fromRow warning. However, note that these are cosmetic and you’ll run into them from time to time – we’ll be working to gradually clean them up in following releases.
Regards,
Alec Smecher
Public Knowledge Project Team
function getBlockContext() {
if (!Config::getVar('general', 'installed')) return BLOCK_CONTEXT_SIDEBAR;
return parent::getBlockContext();
}
to
function getBlockContext($contextId = null) {
if (!Config::getVar('general', 'installed')) return BLOCK_CONTEXT_SIDEBAR;
return parent::getBlockContext($contextId);
}
and from
function getEnabled() {
if (!Config::getVar('general', 'installed')) return true;
return parent::getEnabled();
}
to
function getEnabled($contextId = null) {
if (!Config::getVar('general', 'installed')) return true;
return parent::getEnabled($contextId);
}
instead, for the last one, PHP Strict Standards: Declaration of SubmissionFileDAO::fromRow() i checked the result after applyed patch, but for the front-end site no errors in php log, but, in back-end site showed me new errors, so i returned to original code.
copy the errors, after my modify:
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:54 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:55 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:56 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:56 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:56 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
[21-Dec-2017 09:53:56 Europe/Berlin] PHP Notice: Undefined variable: fileImplementation in /Applications/MAMP/htdocs/agro/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 889
I’d suggest reverting your change for that last one – it’s not a trivial fix like the first two, and your change is likely to cause problems. The warnings you were originally getting are cosmetic and can be ignored until it’s fixed fully in a future release.
Regards,
Alec Smecher
Public Knowledge Project Team
Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/bmebbior/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 19
Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /var/www/issa.africa/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 140```
That warning is already resolved in OJS 3.1.2. But it’s just cosmetic and shouldn’t be causing any failures, unless you have configured your system to display error messages in the browser; if you’ve done that, warnings will interrupt AJAX requests and cause problems there. It is better to configure your system to send error and warning messages to the log.
Regards,
Alec Smecher
Public Knowledge Project Team
You’ll need to work with the display_errors setting (it’s in both config.inc.php and your PHP configuration).
You’ll definitely need to fix the spam injection you mentioned on your other thread before you can expect things to behave predictably. I just posted about a similar problem on another thread.
Regards,
Alec Smecher
Public Knowledge Project Team