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 text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_CONNECTION Keep-Alive
CONTENT_LENGTH 0
HTTP_HOST www.thebestecigarette.co.uk
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_HTTPS 1
REDIRECT_UNIQUE_ID YVF3kJJpraF1IRYH@jL6aAAAAFM
REDIRECT_SCRIPT_URL /ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
REDIRECT_SCRIPT_URI https://www.thebestecigarette.co.uk/ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI www.thebestecigarette.co.uk
REDIRECT_STATUS 200
UNIQUE_ID YVF3kJJpraF1IRYH@jL6aAAAAFM
SCRIPT_URL /ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
SCRIPT_URI https://www.thebestecigarette.co.uk/ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
HTTPS on
SSL_TLS_SNI www.thebestecigarette.co.uk
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.thebestecigarette.co.uk
SERVER_ADDR 160.153.207.136
SERVER_PORT 443
REMOTE_ADDR 3.227.235.216
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 43368
REDIRECT_URL /ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /ecig-tanks/tank-accessories/innokin-prism-t18ii-magnectic-cap/
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1632728976.7157
REQUEST_TIME 1632728976
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