Unhandled Error!

Undefined index: HTTP_REFERER

Document /modules/shopproductbooking/controllers/booking.php
Document type PHP document
Line 163
Exception class Phpr_PhpException

Code Highlight

        $bookingDomain = Phpr::$config->get("BOOKING_FORM_DOMAIN",
            "booking." . str_replace("www.", "", $_SERVER['HTTP_HOST'])
        );
        if($dev = Phpr::$request->getField('dev_domain')) {
            $bookingDomain = str_replace("booking", "booking-$dev", $bookingDomain);
        }
        elseif(preg_match('/(?<=dev_domain=)[a-z]+/', $_SERVER['HTTP_REFERER'], $matches)) {
            $bookingDomain = str_replace("booking", "booking-{$matches[0]}", $bookingDomain);
        }
        return $bookingDomain;
    }
 
	public function getRemoteBookingForm() {
# Call Stack Code Document Line
31 ProductBookingController::getBookingDomain(()) /modules/shopproductbooking/controllers/booking.php 88
30 ProductBookingController::getRemoteProductDetails(array(1) [0 => '140245']) /modules/shopproductbooking/controllers/booking.php 44
29 ProductBookingController::getProductDetails(array(1) [0 => '140245']) /modules/shopproductbooking/classes/shopproductbooking_module.php 58
28 ShopProductBooking_Module->after_product_fetch(object(Shop_Product))
27 call_user_func_array(array(2) [0 => object(ShopProductBooking_Module), 1 => 'after_product_fetch'], array(1) [0 => object(Shop_Product)]) /phproad/system/class_functions.php 18
26 callFunction(array(2) [0 => object(ShopProductBooking_Module), 1 => 'after_product_fetch'], array(1) [0 => object(Shop_Product)]) /phproad/modules/phpr/classes/phpr_events.php 79
25 Phpr_Events->fire_event(array(1) [name => 'shop:onAfterProductRecordFetch'], object(Shop_Product))
24 call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => object(Shop_Product)]) /phproad/system/class_functions.php 18
23 callFunction(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => object(Shop_Product)]) /phproad/modules/phpr/classes/phpr_events.php 153
22 Phpr_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product))
21 call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fireEvent'], array(2) [0 => 'shop:onAfterProductRecordFetch', 1 => object(Shop_Product)]) /phproad/modules/phpr/classes/phpr_extensible.php 159
20 Phpr_Extensible->__call('fireEvent', array(2) [0 => 'shop:onAfterProductRecordFetch', 1 => object(Shop_Product)]) /modules/shop/models/shop_product.php 1861
19 Backend_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product)) /modules/shop/models/shop_product.php 1861
18 Shop_Product->after_fetch(()) /phproad/modules/db/classes/db_activerecord.php 444
17 Db_ActiveRecord->_find_fill(array(1) [0 => array(138)], null) /phproad/modules/db/classes/db_activerecord.php 540
16 Db_ActiveRecord->find_all_internal(null, array(0), null) /phproad/modules/db/classes/db_activerecord.php 477
15 Db_ActiveRecord->find(()) /modules/shop/classes/shop_productsearch.php 648
14 Shop_ProductSearch::find_products('chipper', object(Phpr_Pagination), 1, array(8) [category_ids => array(0), manufacturer_ids => array(0), options => array(0), attributes => array(0), min_price => null, max_price => null, sorting => '', custom_groups => array(0)]) /modules/shop/models/shop_product.php 3045
13 Shop_Product::find_products('chipper', object(Phpr_Pagination), 1, array(8) [category_ids => array(0), manufacturer_ids => array(0), options => array(0), attributes => array(0), min_price => null, max_price => null, sorting => '', custom_groups => array(0)]) /modules/shop/classes/shop_actions.php 2910
12 Shop_Actions->search(()) /modules/cms/classes/cms_actionmanager.php 72
11 Cms_ActionManager::execAction('shop:search', object(Cms_Controller)) /modules/cms/classes/cms_controller.php 580
10 Cms_Controller->eval_page_content(()) /modules/cms/classes/cms_controller.php 198
9 Cms_Controller->open(object(Cms_Page), array(0)) /controllers/application.php 72
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/search') /phproad/system/phproad.php 31
2 include('/var/www/vhosts/nationaltoolhireshops.co.uk/httpdocs/phproad/system/phproad.php') /boot.php 114
1 require_once('/var/www/vhosts/nationaltoolhireshops.co.uk/httpdocs/boot.php') /index.php 23