12. Whoops\Exception\ErrorException
…/­helpers/­newProductHelpers.php275
11. Whoops\Run handleError
…/­helpers/­newProductHelpers.php275
10. prodHelpers simpleAdd
…/­themes/­default/­views/­product/­view.php101
9. include
…/­src/­PMCOM/­Core/­View.php51
8. PMCOM\Core\View _load
<#unknown>0
7. call_user_func_array
…/­src/­PMCOM/­Core/­View.php193
6. PMCOM\Core\View __callStatic
…/­src/­PMCOM/­Front/­Product.php452
5. PMCOM\Core\View load
…/­src/­PMCOM/­Front/­Product.php452
4. PMCOM\Front\Product view
…/­src/­PMCOM/­Core/­Router.php117
3. PMCOM\Core\Router _get_route
<#unknown>0
2. call_user_func_array
…/­src/­PMCOM/­Core/­Router.php158
1. PMCOM\Core\Router __callStatic
…/­index.php99
0. PMCOM\Core\Router get_route
…/­index.php99

Whoops \ Exception \ ErrorException (E_WARNING) Whoops\Exception\ErrorException thrown with message "Invalid argument supplied for foreach()" Stacktrace: #12 Whoops\Exception\ErrorException in /home/tbec71889672/public_html/helpers/newProductHelpers.php:275 #11 Whoops\Run:handleError in /home/tbec71889672/public_html/helpers/newProductHelpers.php:275 #10 prodHelpers:simpleAdd in /home/tbec71889672/public_html/themes/default/views/product/view.php:101 #9 include in /home/tbec71889672/public_html/src/PMCOM/Core/View.php:51 #8 PMCOM\Core\View:_load in <#unknown>:0 #7 call_user_func_array in /home/tbec71889672/public_html/src/PMCOM/Core/View.php:193 #6 PMCOM\Core\View:__callStatic in /home/tbec71889672/public_html/src/PMCOM/Front/Product.php:452 #5 PMCOM\Core\View:load in /home/tbec71889672/public_html/src/PMCOM/Front/Product.php:452 #4 PMCOM\Front\Product:view in /home/tbec71889672/public_html/src/PMCOM/Core/Router.php:117 #3 PMCOM\Core\Router:_get_route in <#unknown>:0 #2 call_user_func_array in /home/tbec71889672/public_html/src/PMCOM/Core/Router.php:158 #1 PMCOM\Core\Router:__callStatic in /home/tbec71889672/public_html/index.php:99 #0 PMCOM\Core\Router:get_route in /home/tbec71889672/public_html/index.php:99

Invalid argument supplied for foreach()

/home/tbec71889672/public_html/helpers/newProductHelpers.php
				if( in_array( strtolower( $option->name ), array( 'colour', 'color', 'colours', 'colours' ) ) ) :
					$selectAttributes .= " class=\"product-filter\" onchange=\"check_price( this.value, '" . $product->id . "' )\" ";
				else :
					$selectAttributes .= " class=\"product-filter\" onchange=\"check_price( this.value, '" . $product->id . "' )\" ";
				endif;
				$options .= '<p class="attribute-name"><span>' . $option->name . ':</span>';
				$options .= "<select {$selectAttributes}>";
				foreach( $choices as $choice_key => $choice ) :
					$selected = $value == $choice_key ? 'selected="selected"' : '';
					$options .= "<option {$selected} value=\"{$choice_key}\">{$choice}</option>";
/home/tbec71889672/public_html/helpers/newProductHelpers.php
				if( in_array( strtolower( $option->name ), array( 'colour', 'color', 'colours', 'colours' ) ) ) :
					$selectAttributes .= " class=\"product-filter\" onchange=\"check_price( this.value, '" . $product->id . "' )\" ";
				else :
					$selectAttributes .= " class=\"product-filter\" onchange=\"check_price( this.value, '" . $product->id . "' )\" ";
				endif;
				$options .= '<p class="attribute-name"><span>' . $option->name . ':</span>';
				$options .= "<select {$selectAttributes}>";
				foreach( $choices as $choice_key => $choice ) :
					$selected = $value == $choice_key ? 'selected="selected"' : '';
					$options .= "<option {$selected} value=\"{$choice_key}\">{$choice}</option>";
cpt-obvious This frame is within function 'handleError'
/home/tbec71889672/public_html/themes/default/views/product/view.php
									<h4>Purchased this product?</h4>
									<a href="/product_review/add/<?php echo $product->id; ?>" class="fancybox fancybox.iframe btn btn-primary btn-sm"><i class="fa fa-star-half-o"></i> Submit a Review</a>
								</div>
							<?php endif; ?>
 
							<div class="purchase-wrapper">
								<?php echo Form::form_open( 'add_cart', BASE_URL . 'cart/add/' . $product->id, 'post', '' ); ?>
									<?php prodHelpers::simpleAdd( $product, $post_values ); ?>
								<?php echo Form::form_close(); ?>
								<?php if( !$product->has_stock ) : ?>
cpt-obvious This frame is within function 'simpleAdd'
/home/tbec71889672/public_html/src/PMCOM/Core/View.php
		if(file_exists(Display::theme_path().'views/'.$view.'.php'))
		{
		
			if($data) extract($data);
			
			//ob_start();
			include Display::theme_path().'header.php';			
			include Display::theme_path().'views/'.$view.'.php';
			include Display::theme_path().'footer.php';			
			/* $cachefile = ''.date('M-d-Y').'.html';
cpt-obvious This frame is within function 'include'
<#unknown>
cpt-obvious This frame is within function '_load'
/home/tbec71889672/public_html/src/PMCOM/Core/View.php
 
	public static function __callStatic( $method, $parameters )
	{
		if( is_null( static::$instance ) )
		{
			static::$instance = new View();
		}
		return call_user_func_array( array( static::$instance, '_' . $method ), $parameters );
	}
 
cpt-obvious This frame is within function 'call_user_func_array'
/home/tbec71889672/public_html/src/PMCOM/Front/Product.php
 
		if( ! $product->has_stock && ! $product->display_not_in_stock )
		{
			View::show404();
		}
		else
		{
			View::load('product/view', $this->data);
		}
 
cpt-obvious This frame is within function '__callStatic'
/home/tbec71889672/public_html/src/PMCOM/Front/Product.php
 
		if( ! $product->has_stock && ! $product->display_not_in_stock )
		{
			View::show404();
		}
		else
		{
			View::load('product/view', $this->data);
		}
 
cpt-obvious This frame is within function 'load'
/home/tbec71889672/public_html/src/PMCOM/Core/Router.php
				} elseif( $method === 'index' ) {
					$method = $class;
				}
				foreach( $controllers as $controller ) :
					try {
						$routed = $this->container->get( $controller );
						if( $routed->exists( $method ) ) :
							die( $routed->view( $method ) );
						endif;
					} catch( \Orno\Di\Exception\ReflectionException $e ) {}
cpt-obvious This frame is within function 'view'
<#unknown>
cpt-obvious This frame is within function '_get_route'
/home/tbec71889672/public_html/src/PMCOM/Core/Router.php
 
	public static function __callStatic( $method, $parameters )
	{
		if( is_null( static::$instance ) )
		{
			static::$instance = new Router();
		}
		return call_user_func_array( array( static::$instance, '_' . $method ), $parameters );
	}
 
cpt-obvious This frame is within function 'call_user_func_array'
/home/tbec71889672/public_html/index.php
|---------------------------------------------------------------
| LOAD THE ROUTES CLASS
|---------------------------------------------------------------
|
| And away we go...
|
*/
PMCOM\Core\Router::get_route( $container );
cpt-obvious This frame is within function '__callStatic'
/home/tbec71889672/public_html/index.php
|---------------------------------------------------------------
| LOAD THE ROUTES CLASS
|---------------------------------------------------------------
|
| And away we go...
|
*/
PMCOM\Core\Router::get_route( $container );
cpt-obvious This frame is within function 'get_route'
Key Value
LSPHP_ENABLE_USER_INI on
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
HTTP_ACCEPT */*
CONTENT_LENGTH 0
HTTP_HOST www.thebestecigarette.co.uk
HTTP_USER_AGENT claudebot
HTTP_X_HTTPS 1
REDIRECT_UNIQUE_ID ZgVpn1BOOqrV6KK6S5uiOwAAyxg
REDIRECT_SCRIPT_URL /ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
REDIRECT_SCRIPT_URI https://www.thebestecigarette.co.uk/ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
REDIRECT_USER_ID 4182016
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI www.thebestecigarette.co.uk
REDIRECT_HTTP2 on
REDIRECT_H2PUSH off
REDIRECT_H2_PUSH off
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_STREAM_TAG 12331-30-3
REDIRECT_STATUS 200
UNIQUE_ID ZgVpn1BOOqrV6KK6S5uiOwAAyxg
SCRIPT_URL /ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
SCRIPT_URI https://www.thebestecigarette.co.uk/ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
USER_ID 4182016
HTTPS on
SSL_TLS_SNI www.thebestecigarette.co.uk
HTTP2 on
H2PUSH off
H2_PUSH off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID 3
H2_STREAM_TAG 12331-30-3
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.thebestecigarette.co.uk
SERVER_ADDR 92.205.89.213
SERVER_PORT 443
REMOTE_ADDR 3.237.65.102
DOCUMENT_ROOT /home/tbec71889672/public_html
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/tbec71889672/public_html
SERVER_ADMIN webmaster@thebestecigarette.co.uk
SCRIPT_FILENAME /home/tbec71889672/public_html/index.php
REMOTE_PORT 34428
REDIRECT_URL /ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
SERVER_PROTOCOL HTTP/2.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /ecig-kits/disposable-e-cigarettes/elf-bar-600-disposables/elf-bar-strawberry-ice-disposable-pod-device-20mg/
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711630751.2392
REQUEST_TIME 1711630751
empty
empty
empty
empty
empty
Key Value
LSPHP_ENABLE_USER_INI on
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
0. PMCOM\Core\PurposeHandler
1. Whoops\Handler\CallbackHandler