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
33 ProductBookingController::getBookingDomain(()) /modules/shopproductbooking/controllers/booking.php 88
32 ProductBookingController::getRemoteProductDetails(array(1) [0 => '999980']) /modules/shopproductbooking/controllers/booking.php 44
31 ProductBookingController::getProductDetails(array(4) [0 => '010425', 1 => '010430', 2 => '010435', 3 => '999980']) /modules/shopproductbooking/classes/shopproductbooking_module.php 58
30 ShopProductBooking_Module->after_product_fetch(object(Shop_Product))
29 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
28 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
27 Phpr_Events->fire_event(array(1) [name => 'shop:onAfterProductRecordFetch'], object(Shop_Product))
26 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
25 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
24 Phpr_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product))
23 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
22 Phpr_Extensible->__call('fireEvent', array(2) [0 => 'shop:onAfterProductRecordFetch', 1 => object(Shop_Product)]) /modules/shop/models/shop_product.php 1861
21 Backend_Events->fireEvent('shop:onAfterProductRecordFetch', object(Shop_Product)) /modules/shop/models/shop_product.php 1861
20 Shop_Product->after_fetch(()) /phproad/modules/db/classes/db_activerecord.php 444
19 Db_ActiveRecord->_find_fill(array(1) [0 => array(138)], null) /phproad/modules/db/classes/db_activerecord.php 540
18 Db_ActiveRecord->find_all_internal(null, array(0)) /phproad/modules/db/classes/db_activerecord.php 648
17 Db_ActiveRecord->find_all_by('url_name', 'roof-ladder-hire', array(0)) /phproad/modules/db/classes/db_activerecord.php 642
16 Db_ActiveRecord->find_by('url_name', 'roof-ladder-hire')
15 call_user_func_array(array(2) [0 => object(Shop_Product), 1 => 'find_by'], array(2) [0 => 'url_name', 1 => 'roof-ladder-hire']) /phproad/modules/db/classes/db_activerecord.php 1651
14 Db_ActiveRecord->__call('find_by_url_name', array(1) [0 => 'roof-ladder-hire']) /modules/shop/classes/shop_actions.php 110
13 Shop_Product->find_by_url_name('roof-ladder-hire') /modules/shop/classes/shop_actions.php 110
12 Shop_Actions->product(()) /modules/cms/classes/cms_actionmanager.php 72
11 Cms_ActionManager::execAction('shop:product', 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(1) [0 => 'roof-ladder-hire']) /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('/product/roof-ladder-hire') /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