Whoops \ Exception \ ErrorException (E_WARNING)
A non-numeric value encountered Whoops\Exception\ErrorException thrown with message "A non-numeric value encountered" Stacktrace: #2 Whoops\Exception\ErrorException in /home/admin/web/phone-909.ru/public_html/includes/number-text.php:23 #1 Whoops\Run:handleError in /home/admin/web/phone-909.ru/public_html/includes/number-text.php:23 #0 require in /home/admin/web/phone-909.ru/public_html/index.php:116
Stack frames (3)
2
Whoops
\
Exception
\
ErrorException
/
includes
/
number-text.php
23
1
Whoops
\
Run
handleError
/
includes
/
number-text.php
23
0
require
/
index.php
116
/
home
/
admin
/
web
/
phone-909.ru
/
public_html
/
includes
/
number-text.php
 
/* Get and cache statistic */
$file = $_SERVER['DOCUMENT_ROOT'] . '/cached/numbers_stat.json';
if (file_exists($file) && filemtime($file)+86400 > time()) {
    $stat = file_get_contents($file);
    $stat = json_decode($stat, TRUE);
} else {
    $row = DB::table("data_number")->select('operator', 'abc', 'start', 'end')->get();
 
    $stat = array('sum_all' => '', 'sum_megafon' => '', 'sum_mts' => '', 'sum_beeline' => '', 'sum_tele2' => '', 'sum_mobile' => '', 'sum_static' => '', 'sum_free' => '');
    foreach ($row as $value) {
        $value = json_decode(json_encode($value), true);
        $numbers = $value['end']-$value['start'];
    
        if($value['operator'] == 'ПАО «МегаФон»') {
            $stat['sum_megafon'] += $numbers;
        } elseif($value['operator'] == 'ПАО «Мобильные ТелеСистемы»') {
            $stat['sum_mts'] += $numbers;
        } elseif($value['operator'] == 'ПАО «Вымпел-Коммуникации»') {
            $stat['sum_beeline'] += $numbers;
        } elseif($value['operator'] == 'ООО «Т2 Мобайл»') {
            $stat['sum_tele2'] += $numbers;
        }
        
        if(substr($value['abc'], 0, 1) == '9') {
            $stat['sum_mobile'] += $numbers;
        } elseif(substr($value['abc'], 0, 3) == '800') {
            $stat['sum_free'] += $numbers;
        } else {
            $stat['sum_static'] += $numbers;
        }
        
        $stat['sum_all'] += $numbers;
    }
    
    file_put_contents($file, json_encode($stat, JSON_UNESCAPED_UNICODE));
}
 
/* META */
$meta = array(
/
home
/
admin
/
web
/
phone-909.ru
/
public_html
/
includes
/
number-text.php
 
/* Get and cache statistic */
$file = $_SERVER['DOCUMENT_ROOT'] . '/cached/numbers_stat.json';
if (file_exists($file) && filemtime($file)+86400 > time()) {
    $stat = file_get_contents($file);
    $stat = json_decode($stat, TRUE);
} else {
    $row = DB::table("data_number")->select('operator', 'abc', 'start', 'end')->get();
 
    $stat = array('sum_all' => '', 'sum_megafon' => '', 'sum_mts' => '', 'sum_beeline' => '', 'sum_tele2' => '', 'sum_mobile' => '', 'sum_static' => '', 'sum_free' => '');
    foreach ($row as $value) {
        $value = json_decode(json_encode($value), true);
        $numbers = $value['end']-$value['start'];
    
        if($value['operator'] == 'ПАО «МегаФон»') {
            $stat['sum_megafon'] += $numbers;
        } elseif($value['operator'] == 'ПАО «Мобильные ТелеСистемы»') {
            $stat['sum_mts'] += $numbers;
        } elseif($value['operator'] == 'ПАО «Вымпел-Коммуникации»') {
            $stat['sum_beeline'] += $numbers;
        } elseif($value['operator'] == 'ООО «Т2 Мобайл»') {
            $stat['sum_tele2'] += $numbers;
        }
        
        if(substr($value['abc'], 0, 1) == '9') {
            $stat['sum_mobile'] += $numbers;
        } elseif(substr($value['abc'], 0, 3) == '800') {
            $stat['sum_free'] += $numbers;
        } else {
            $stat['sum_static'] += $numbers;
        }
        
        $stat['sum_all'] += $numbers;
    }
    
    file_put_contents($file, json_encode($stat, JSON_UNESCAPED_UNICODE));
}
 
/* META */
$meta = array(
/
home
/
admin
/
web
/
phone-909.ru
/
public_html
/
index.php
    if (!empty($uri[1]) && $uri[1] == 'personal-data') {
        $page = 'about-personal-data';
    } elseif (!empty($uri[1])) {
        header("HTTP/1.0 404 Not Found");
        $page = 404;
    } else {
        $page = 'about';
    }
}
 
# TEMPLATE RENDER
 
if (empty($page)) {
    header("HTTP/1.0 404 Not Found");
    $page = 404;
}
 
 
ob_start("ob_html_compress");
require("includes/$page.php");
ob_end_flush();
#echo 'Script time: '.round(microtime(true) - $start, 4).' sec.';
 

Environment & details:

empty
empty
empty
empty
Key Value
_token 49e933c4fa3a2aa4f30f1025dc215870
Key Value
REDIRECT_STATUS 200
HTTP_HOST phone-909.ru
HTTP_X_REAL_IP 3.236.18.23
HTTP_X_FORWARDED_FOR 3.236.18.23
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1
SERVER_NAME phone-909.ru
SERVER_ADDR 109.68.215.173
SERVER_PORT 80
REMOTE_ADDR 109.68.215.173
DOCUMENT_ROOT /home/admin/web/phone-909.ru/public_html
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/admin/web/phone-909.ru/public_html
SERVER_ADMIN info@phone-909.ru
SCRIPT_FILENAME /home/admin/web/phone-909.ru/public_html/index.php
REMOTE_PORT 55692
REDIRECT_URL /number
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /number
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710843626.313
REQUEST_TIME 1710843626
empty
0. Whoops\Handler\PrettyPageHandler