Whoops \ Exception \ ErrorException (E_NOTICE)
A non well formed numeric value encountered Whoops\Exception\ErrorException thrown with message "A non well formed numeric value encountered" Stacktrace: #13 Whoops\Exception\ErrorException in /home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php:87 #12 number_format in /home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php:87 #11 formatNumber in /home/ploi/oneip.vn/wp-content/themes/oneip/resources/views/front/product/index.php:706 #10 include in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/professional/src/Template/TachyonTemplateEngine.php:127 #9 TypeRocketPro\Template\TachyonTemplateEngine:load in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php:225 #8 TypeRocket\Template\View:load in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php:237 #7 TypeRocket\Template\View:render in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Response.php:1045 #6 TypeRocket\Http\Response:finish in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php:156 #5 TypeRocket\Http\Router:runRoute in /home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php:53 #4 TypeRocket\Http\Router:TypeRocket\Http\{closure} in /home/ploi/oneip.vn/wp-includes/class-wp-hook.php:308 #3 WP_Hook:apply_filters in /home/ploi/oneip.vn/wp-includes/plugin.php:205 #2 apply_filters in /home/ploi/oneip.vn/wp-includes/template-loader.php:104 #1 require_once in /home/ploi/oneip.vn/wp-blog-header.php:19 #0 require in /home/ploi/oneip.vn/index.php:17
Stack frames (14)
13
Whoops\Exception\ErrorException
/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php87
12
number_format
/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php87
11
formatNumber
/home/ploi/oneip.vn/wp-content/themes/oneip/resources/views/front/product/index.php706
10
include
/vendor/typerocket/professional/src/Template/TachyonTemplateEngine.php127
9
TypeRocketPro\Template\TachyonTemplateEngine load
/vendor/typerocket/core/src/Template/View.php225
8
TypeRocket\Template\View load
/vendor/typerocket/core/src/Template/View.php237
7
TypeRocket\Template\View render
/vendor/typerocket/core/src/Http/Response.php1045
6
TypeRocket\Http\Response finish
/vendor/typerocket/core/src/Http/Router.php156
5
TypeRocket\Http\Router runRoute
/vendor/typerocket/core/src/Http/Router.php53
4
TypeRocket\Http\Router TypeRocket\Http\{closure}
/home/ploi/oneip.vn/wp-includes/class-wp-hook.php308
3
WP_Hook apply_filters
/home/ploi/oneip.vn/wp-includes/plugin.php205
2
apply_filters
/home/ploi/oneip.vn/wp-includes/template-loader.php104
1
require_once
/home/ploi/oneip.vn/wp-blog-header.php19
0
require
/home/ploi/oneip.vn/index.php17
/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php
        'Đang xây dựng' => __('Đang xây dựng'),
        'Đang vận hành' => __('Đang vận hành'),
        'Đã hết hạn' => __('Đã hết hạn')
    ];
}
function getPlaceTypes() {
    return [
        'Queenbee' => __('Queenbee'),
        'Key Market' => __('Key Market'),
        'Vocational school' => __('Vocational school')
    ];
}
function getUnitStates() {
    return [
        'Đang xây dựng' => __('Đang xây dựng'),
        'Đang hoạt động' => __('Đang hoạt động')
    ];
}
function formatNumber($number) {
    return number_format( $number , 0 , ',' , '.' );
}
function formatFloat($number) {
    return number_format( $number , 2 , ',' , '.' );
}
 
function get_unit_image($unit_id) {
    $image_name = $unit_id.'-hinh01.jpg'; 
    //$image_name = 'hinh-404.jpg';
    $exist = file_exists(__DIR__ . '/../../../../unit_images/' . $image_name);
    if($exist) {
        return  $image_name;
    } 
    return 'hinh-404.jpg';
}
 
function get_unit_images($unit_id) {
    $images = [];
 
    for ($i=1; $i < 20; $i++) { 
        $number_string = str_pad($i, 2, '0', STR_PAD_LEFT); 
/home/ploi/oneip.vn/wp-content/themes/oneip/funcs/data_helper.php
        'Đang xây dựng' => __('Đang xây dựng'),
        'Đang vận hành' => __('Đang vận hành'),
        'Đã hết hạn' => __('Đã hết hạn')
    ];
}
function getPlaceTypes() {
    return [
        'Queenbee' => __('Queenbee'),
        'Key Market' => __('Key Market'),
        'Vocational school' => __('Vocational school')
    ];
}
function getUnitStates() {
    return [
        'Đang xây dựng' => __('Đang xây dựng'),
        'Đang hoạt động' => __('Đang hoạt động')
    ];
}
function formatNumber($number) {
    return number_format( $number , 0 , ',' , '.' );
}
function formatFloat($number) {
    return number_format( $number , 2 , ',' , '.' );
}
 
function get_unit_image($unit_id) {
    $image_name = $unit_id.'-hinh01.jpg'; 
    //$image_name = 'hinh-404.jpg';
    $exist = file_exists(__DIR__ . '/../../../../unit_images/' . $image_name);
    if($exist) {
        return  $image_name;
    } 
    return 'hinh-404.jpg';
}
 
function get_unit_images($unit_id) {
    $images = [];
 
    for ($i=1; $i < 20; $i++) { 
        $number_string = str_pad($i, 2, '0', STR_PAD_LEFT); 
/home/ploi/oneip.vn/wp-content/themes/oneip/resources/views/front/product/index.php
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->acreage_production) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('acreage_production'); ?></span> <span class="text-right"><?php echo formatNumber($unit->acreage_production);  ?> m2</span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->office_production_rate) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('office_production_rate'); ?></span> <span class="text-right"><?php echo formatNumber($unit->office_production_rate);  ?> %</span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->minimum_land_lease) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('minimum_land_lease'); ?></span> <span class="text-right"><?php echo formatNumber($unit->minimum_land_lease);  ?>  m2</span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->leasable_area) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('leasable_area'); ?></span> <span class="text-right"><?php echo formatNumber($unit->leasable_area);  ?> m2</span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->min_leasing_charge) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('min_leasing_charge'); ?></span> <span class="text-right">$<?php echo formatNumber($unit->min_leasing_charge);  ?></span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->min_leasing_month) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('min_leasing_month'); ?></span> <span class="text-right"><?php echo formatNumber($unit->min_leasing_month);  ?> months</span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->max_leasing_charge) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('max_leasing_charge'); ?></span> <span class="text-right"><?php echo formatNumber($unit->max_leasing_charge);  ?></span></p>
                                </li>
                            <?php } ?>
                            <?php if( !empty($unit->firer_tank_capacity) ){ ?>
                                <li>
                                    <p class="inline-flex w-[90%] justify-between whitespace-pre-line text-black"><span class="font-bold"><?php echo __l('firer_tank_capacity'); ?></span> <span class="text-right"><?php echo formatNumber($unit->firer_tank_capacity);  ?> m3</span></p>
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/professional/src/Template/TachyonTemplateEngine.php
        echo $this->sections[$section] ?? null;
    }
 
    /**
     * @param string $layout
     */
    public function layout($layout)
    {
        $this->layout = $layout;
        ob_start();
    }
 
    /**
     * Load Template
     */
    public function load()
    {
        extract( $this->data );
        /** @noinspection PhpIncludeInspection */
        include ( $this->file );
 
        if($this->layout) {
            $html = trim(ob_get_clean());
 
            if(empty($this->sections['main'])) {
                $this->sections['main'] = $html;
            } elseif($html) {
                $this->sections['__main'] = $html;
            }
 
            $this->include($this->layout);
        }
    }
}
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php
    {
        $view_title = $this->getTitle();
        $this->setContext($context);
 
        if($view_title) {
            add_filter('document_title_parts', function( $title ) use ($view_title) {
                if( is_string($view_title) ) {
                    $title = [];
                    $title['title'] = $view_title;
                } elseif ( is_array($view_title) ) {
                    $title = $view_title;
                }
                return $title;
            }, 101);
        }
 
        $this->setFolder($this->getFolderPath());
        $file = $this->getComposedFilePath();
        $templateEngine = $this->viewsEngine ?? Config::get('app.templates.' . $context) ?? Config::get('app.templates.views');
        (new $templateEngine($file, $this->getData(), $context, $this))->load();
    }
 
    /**
     * Render View
     *
     * @param string|null $context the views context to use
     */
    public function render($context = null)
    {
        $context = $context ?? $this->getContext() ?? 'views';
 
        $this->load($context);
    }
 
    /**
     * Set Context
     *
     * Can be a key from config/paths like `views`.
     *
     * @param null|string $context the template engine context to use
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Template/View.php
                return $title;
            }, 101);
        }
 
        $this->setFolder($this->getFolderPath());
        $file = $this->getComposedFilePath();
        $templateEngine = $this->viewsEngine ?? Config::get('app.templates.' . $context) ?? Config::get('app.templates.views');
        (new $templateEngine($file, $this->getData(), $context, $this))->load();
    }
 
    /**
     * Render View
     *
     * @param string|null $context the views context to use
     */
    public function render($context = null)
    {
        $context = $context ?? $this->getContext() ?? 'views';
 
        $this->load($context);
    }
 
    /**
     * Set Context
     *
     * Can be a key from config/paths like `views`.
     *
     * @param null|string $context the template engine context to use
     *
     * @return $this
     */
    public function setContext($context = null)
    {
        $this->context = $context ?? $this->getContext();
 
        return $this;
    }
 
    /**
     * @return null|string
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Response.php
        if( $forceResponseArray ) {
            $response->exitJson($statusCode);
        }
 
        if(class_exists('\TypeRocketPro\Http\Download')) {
            if( $returned instanceof \TypeRocketPro\Http\Download) {
                $returned->send();
            }
        }
 
        if( $returned instanceof Redirect) {
            $returned->now();
        }
 
        if( $returned instanceof Response ) {
            wp_send_json( $returned->toArray() );
        }
 
        if( $returned instanceof View ) {
            $returned->render();
            die();
        }
 
        if( $returned instanceof Model ) {
            wp_send_json( $returned->toArray() );
        }
 
        if( $returned instanceof Results ) {
            wp_send_json( $returned->toArray() );
        }
 
        if( is_callable($returned) ) {
            call_user_func($returned, $this);
            die();
        }
 
        if( is_array($returned) || is_object($returned) ) {
 
            if($returned instanceof \WP_Error) {
                $statusCode = $returned->get_error_code();
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php
 
        if($redirect) {
            $redirect = Str::replaceFirst($requestedPath, $redirect, $this->request->getUri());
            $redirect = apply_filters('typerocket_route_redirect', $redirect, $this, $wpTrailingslash);
 
            if($redirect) {
                wp_redirect($redirect);
                die();
            }
        }
 
        $responder = new HttpResponder;
 
        $responder
            ->getHandler()
            ->setRoute( $this->route )
            ->setController( $this->route->do );
 
        $responder->respond( $this->args );
        \TypeRocket\Http\Response::getFromContainer()->finish();
    }
 
    /**
     * Route request through registered routes if these is a match
     * @return Router
     */
    public function detectRoute()
    {
        $root = $this->config['root'] ?? get_site_url();
 
        $routesRegistered = $this->routes->getRegisteredRoutes($this->request->getFormMethod());
        $this->path = $this->request->getPathWithoutRoot($root);
 
        if( $this->matchRoute($this->path, $routesRegistered) ) {
            add_filter( 'redirect_canonical', [$this, 'redirectCanonical'] , 10, 2);
        }
 
        return $this;
    }
 
/home/ploi/oneip.vn/wp-content/plugins/typerocket-v5/typerocket/vendor/typerocket/core/src/Http/Router.php
     */
    public function __construct($request, $config, RouteCollection $routes)
    {
        $this->request = $request;
        $this->config = $config;
        $this->routes = $routes;
    }
 
    /**
     * Init Hooks
     *
     * @return $this
     */
    public function initHooks()
    {
        if( ! is_admin() ) {
            // template_include is needed to keep admin bar
            add_filter('template_include', function( $template ) {
                if( $this->route ) {
                    $this->runRoute();
                }
                return $template;
            });
 
            add_filter( 'query_vars', function($vars) {
                $vars[] = 'tr_route_var';
                return $vars;
            } );
 
            add_filter( 'posts_request', function($sql, $q) {
                /** @var WP_Query $q */
                if ( $q->is_main_query() && !empty($q->query['tr_route_var']) ) {
                    // disable row count
                    $q->query_vars['no_found_rows'] = true;
 
                    // disable cache
                    $q->query_vars['cache_results'] = false;
                    $q->query_vars['update_post_meta_cache'] = false;
                    $q->query_vars['update_post_term_cache'] = false;
 
/home/ploi/oneip.vn/wp-includes/class-wp-hook.php
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args                           = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
            $priority                                 = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 == $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/home/ploi/oneip.vn/wp-includes/plugin.php
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
/home/ploi/oneip.vn/wp-includes/template-loader.php
            if ( 'is_attachment' === $tag ) {
                remove_filter( 'the_content', 'prepend_attachment' );
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/home/ploi/oneip.vn/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/home/ploi/oneip.vn/index.php
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

Key Value
query_vars Array ( [tr_route_var] => 1 )
query_string tr_route_var=1
request product/T001-028-U0001-amata-city-bien-hoa
matched_rule ^product/([^\/]+)/?$
matched_query tr_route_var=1
did_permalink 1
Key Value
query Array ( [tr_route_var] => 1 )
query_vars Array ( [tr_route_var] => 1 [ignore_sticky_posts] => 1 [lazy_load_term_meta] => 1 [posts_per_page] => 10 [comments_per_page] => 50 [no_found_rows] => 1 [order] => DESC )
tax_query WP_Tax_Query Object ( [queries] => Array ( ) [relation] => AND [table_aliases:protected] => Array ( ) [queried_terms] => Array ( ) [primary_table] => ip_posts [primary_id_column] => ID )
meta_query WP_Meta_Query Object ( [queries] => Array ( ) [relation] => [meta_table] => [meta_id_column] => [primary_table] => [primary_id_column] => [table_aliases:protected] => Array ( ) [clauses:protected] => Array ( ) [has_or_relation:protected] => )
current_post -1
current_comment -1
is_home 1
empty
empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.26.2
REQUEST_URI /product/T001-028-U0001-amata-city-bien-hoa/
USER ploi
HOME /home/ploi
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Fri, 04 Oct 2024 15:07:53 GMT
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_HOST oneip.vn
REDIRECT_STATUS 200
SERVER_NAME oneip.vn
SERVER_PORT 443
SERVER_ADDR 14.225.215.147
REMOTE_PORT 60196
REMOTE_ADDR 18.97.14.85
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
DOCUMENT_ROOT /home/ploi/oneip.vn
SCRIPT_FILENAME /home/ploi/oneip.vn/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1739837785.5026
REQUEST_TIME 1739837785
empty
0. TypeRocketPro\Features\WhoopsHtmlHandler