*

Dan Dan

  • ***
  • 40 posts
Error retrieving lost mobile version password
« on: December 02, 2019, 04:13:40 PM »
In the mobile version, for the lost password recovery I receive this message: A non-numeric value encountered in oc-includes/osclass/helpers/hUtils.php on line 115
It is part of the function osc_show_recaptcha

Line 115 of the file hUtils.php is:
Code: [Select]
if((time()-$time)<=1200) {
However, the password can be recovered.  How can I fix this error or hide it?

Function in file hUtils.php:
Code: [Select]
function osc_show_recaptcha($section = '') {
    if( osc_recaptcha_public_key() ) {
        if(osc_recaptcha_version()=="2") {
            switch($section) {
                case('recover_password'):
                    Session::newInstance()->_set('recover_captcha_not_set',0);
                    $time  = Session::newInstance()->_get('recover_time');
                    if((time()-$time)<=1200) {
                        echo _osc_recaptcha_get_html(osc_recaptcha_public_key(), substr(osc_language(), 0, 2))."<br />";
                    }
                    else{
                        Session::newInstance()->_set('recover_captcha_not_set',1);
                    }
                    break;

                default:
                    echo _osc_recaptcha_get_html(osc_recaptcha_public_key(), substr(osc_language(), 0, 2))."<br />";
                    break;
            }
        } else {
            require_once osc_lib_path() . 'recaptchalib.php';
            switch($section) {
                case('recover_password'):
                    $time  = Session::newInstance()->_get('recover_time');
                    if((time()-$time)<=1200) {
                        echo recaptcha_get_html( osc_recaptcha_public_key(), null, osc_is_ssl() )."<br />";
                    }
                    break;

                default:
                    echo recaptcha_get_html( osc_recaptcha_public_key(), null, osc_is_ssl() );
                    break;
            }
        }
    }
}

Thanks

*

Dan Dan

  • ***
  • 40 posts
Re: Error retrieving lost mobile version password
« Reply #1 on: December 08, 2019, 09:47:09 AM »
No one? No solution?
I specify that the password recovery function works.
--
Thanks

Marked as best answer by dan.dan on December 09, 2019, 03:09:01 PM
*

MB Themes

Re: Error retrieving lost mobile version password
« Reply #2 on: December 09, 2019, 10:45:30 AM »
try to change:
Code: [Select]
if((time()-$time)<=1200) {

into:
Code: [Select]
if(((float)time()-(float)$time)<=1200) {
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dan Dan

  • ***
  • 40 posts
Re: Error retrieving lost mobile version password
« Reply #3 on: December 09, 2019, 03:08:54 PM »
It works without problems!
You are the best!  ;)