ZC 1.5.7b
PHP 7.4.14
Code:
[30-Jan-2021 08:03:14 UTC] Request URI: ../index.php?main_page=product_info&products_id=1006, IP address: xxx.xxx.xxx.xxx
#1 user_tracking->zen_update_user_tracking() called at [../includes/classes/observers/class.user_tracking.php:30]
#2 user_tracking->update() called at [../includes/classes/class.base.php:118]
#3 base->notify() called at [../includes/templates/CUSTOM/common/tpl_main_page.php:267]
#4 require(../includes/templates/CUSTOM/common/tpl_main_page.php) called at [../index.php:94]
--> PHP Warning: Use of undefined constant NAVBAR_TITLE - assumed 'NAVBAR_TITLE' (this will throw an Error in a future version of PHP) in ../includes/classes/observers/class.user_tracking.php on line 99.
Looking at my User Tracking logs for the IPs that generate this warning it seems to happen with invalid urls. The user ends up on the "Sorry, the product was not found."
In this example it was caused by
/index.php?main_page=product_info&products_id=1006
which should have been
/index.php?main_page=product_info&products_id=1006
or
/index.php?main_page=product_info&products_id=1006
.
In my case this is the incoming landing url so I can't do anything to fix this but would like to find a solution for the PHP warning if possible. This is line 99 from class.user_tracking.php
PHP Code:
$page_desc = defined('HEADING_TITLE') ? HEADING_TITLE : (IS_ADMIN_FLAG !== true ? NAVBAR_TITLE : "");
Bookmarks