Error message in the comment

I apologize for the basic question but my knowledge of programming is quite basic.

Sometime (not always), on Activity page, when I click the Comment link of a Blog, I get the following error message in the comment.

Strict Standards: Static function hypeJunction\Lists\EntityList::getEntityType() should not be abstract in /home/.../mod/hypeLists/classes/hypeJunction/Lists/EntityList.php on line 559
 
Strict Standards: Static function hypeJunction\Lists\EntityList::addSortQuery() should not be abstract in /home/.../mod/hypeLists/classes/hypeJunction/Lists/EntityList.php on line 569
 
Strict Standards: Static function hypeJunction\Lists\EntityList::addSearchQuery() should not be abstract in /home/.../mod/hypeLists/classes/hypeJunction/Lists/EntityList.php on line 579
 
Strict Standards: Static function hypeJunction\Lists\EntityList::addFilterQuery() should not be abstract in /home/.../mod/hypeLists/classes/hypeJunction/Lists/EntityList.php on line 589
As you know Ismayil the Great (I mean it) will not answer, I'd very much appreciate any guidance what to do with it.
 
Elgg 2.3.10
hypeLists 4.1.6
Thank you very much
 
  • PHP has different log levels (or type of log entries). One category is E_STRICT which will add suggestions how to improve the code and what might be necessary to change to keep the code compatible with future versions of PHP. If you are not interested in modifying the code yourself and also for production (not test servers) it might be best to not enable E_STRICT log entries getting created. You would have to change the value of the error_reporting PHP variable in php.ini on your server. For example set

    error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

    or

    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

    It depends how much you want to be added to the log. On a test server when trying new versions of Elgg and/or new or updated plugins or new PHP versions you might want to have more in the logs to see if there are any serious issues. But once you know that there are no problems (errors) to be expected on your production server you can have less log entries on this server.

    The line above would have to be modified in the server's php.ini. In Elgg's .htaccess you can't do it in the same way but you would have to use a bitmask of php constants instead (see for example https://stackoverflow.com/questions/19820866/htaccess-setting-error-display-to-e-all and https://www.php.net/manual/en/errorfunc.constants.php). I think the equivalent of

    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

    in php.ini is

    php_value error_reporting 22519

    in the php settings section in .htaccess.

  • Thank you iionly.

    After I change the error_reporting setting the reported error will disappear, but the error will continue to be there. Does the error not affect the functioning of the system?

  • The log entries are not errors but only warnings. The code works as it is even if it is not strictly standard conform. It might be that on a later PHP version the situation changes and the code might have to be modified but as long as you don't upgrade to a newer PHP version it's not a show stopper (and even on a new PHP version it might still work without changes). That's what the warning is trying to tell you.

  • I understand.

    Thank you very much

  • Sorry for not handling this issue for long time. I was busy with other projects.

    In the default .htaccess of my Elgg site it is written: 

    php_value display_errors 0

    I understand that this directive stop all errors reporting. So, why I continue to receive strict errors?

    Thank you

     

  • It does not stop errors being written to the log but only errors getting displayed on screen.

  • This is the problem. It appears on the screen, on the wall inside one comment. I'm not 100% sure when it happened. It seems right after Flush the caches and disappeared after page refresh.

  • Do you have the Developers plugin enabled? It has a setting to display PHP errors

  • Thank you @Jerome

    Please see below my settings.

    According to these setting I should not get strict notifications on the screen - I think :)

    Developers : Settings

    Control your development and debugging settings below. Some of these settings are also available on other admin pages.

    Turn off this cache when developing. Otherwise, changes to your CSS and JavaScript will be ignored.
    Turn this off when developing. Otherwise, changes in your plugins will not be registered.
    By default, Elgg's .htaccess file supresses the display of fatal errors.
    This controls the amount of information logged. See elgg_log() for more information.
    This displays elgg_log() and elgg_dump() output and a DB query count.
    This displays the translation strings used by elgg_echo().
    Streams loaded modules and values to your JavaScript console.
    This wraps almost every view with HTML comments. Useful for finding the view creating particular HTML. This can break non-HTML views in the default viewtype. See developers_wrap_views() for details.
    Write events and plugin hooks to the log. Warning: there are many of these per page.
    An icon on the bottom right of the viewport that gives admins access to developer settings and links.
  • As you can see you have "Display fatal errors" enabled, this is the php ini setting display_errors which because it's enabled will show errors (including strick errors) on your screen.