osclass/Osclass

PHP Warning: A non-numeric value(s)

Closed this issue · 1 comments

In PHP 7.2+ this raises a warning:

\oc-admin\themes\modern\functions.php

function check_version_admin_footer() {
    if( (time() - osc_last_version_check()) > (24 * 3600) ) {

We need to cast return values as integers to avoid it.

osc_last_version_check
osc_themes_last_version_check
osc_plugins_last_version_check
osc_languages_last_version_check

Above helpers should return integers, as time() returns integer as well.

Just a "fun fact" - Osclass version is stored as INTEGER in database, while all other 3 values as STRING.
Not that it matters much, though. They should still be casted as int's.