Warning: A non-numeric value encountered

后端 未结 18 1637
抹茶落季
抹茶落季 2020-11-22 06:15

Recently updated to PHP 7.1 and start getting following error

Warning: A non-numeric value encountered in on line 29

Here is wha

18条回答
  •  被撕碎了的回忆
    2020-11-22 06:21

    This was happening to me specifically on PHPMyAdmin. So to more specifically answer this, I did the following:

    In File:

    C:\ampps\phpMyAdmin\libraries\DisplayResults.class.php
    

    I changed this:

    // Move to the next page or to the last one
    $endpos = $_SESSION['tmpval']['pos']
        + $_SESSION['tmpval']['max_rows'];
    

    To this:

    $endpos = 0;
    if (!empty($_SESSION['tmpval']['pos']) && is_numeric($_SESSION['tmpval']['pos'])) {
        $endpos += $_SESSION['tmpval']['pos'];
    }
    if (!empty($_SESSION['tmpval']['max_rows']) && is_numeric($_SESSION['tmpval']['max_rows'])) {
        $endpos += $_SESSION['tmpval']['max_rows'];
    }
    

    Hope that save's someone some trouble...

提交回复
热议问题