Post by xlam » Mon May 26, 2014 2:19 pm

Hello,
I'm using Opencart 1.5.51
I just upgrade my shared hosting to VPS hosting, and i get error :
i try solution http://forum.opencart.com/viewtopic.php?f=20&t=120700 but still same
This is error details

Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15Notice: Array to string conversion in /home/pakaiank/public_html/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 15


This is my vq2-catalog_model_tool_image.php script

Code: Select all

<?php
class ModelToolImage extends Model {
	/**
	*	
	*	@param filename string
	*	@param width 
	*	@param height
	*	@param type char [default, w, h]
	*				default = scale with white space, 
	*				w = fill according to width, 
	*				h = fill according to height
	*	
	*/
	public function resize($filename, $width, $height, $type = "") {
		if (!file_exists(DIR_IMAGE . $filename) || !is_file(DIR_IMAGE . $filename)) {
			return;
		} 
		
		$info = pathinfo($filename);
		
		$extension = $info['extension'];
		
		$old_image = $filename;
		$new_image = 'cache/' . utf8_substr($filename, 0, utf8_strrpos($filename, '.')) . '-' . $width . 'x' . $height . $type .'.' . $extension;
		
		if (!file_exists(DIR_IMAGE . $new_image) || (filemtime(DIR_IMAGE . $old_image) > filemtime(DIR_IMAGE . $new_image))) {
			$path = '';
			
			$directories = explode('/', dirname(str_replace('../', '', $new_image)));
			
			foreach ($directories as $directory) {
				$path = $path . '/' . $directory;
				
				if (!file_exists(DIR_IMAGE . $path)) {
					@mkdir(DIR_IMAGE . $path, 0777);
				}		
			}

			list($width_orig, $height_orig) = getimagesize(DIR_IMAGE . $old_image);

			if ($width_orig != $width || $height_orig != $height) {
				$image = new Image(DIR_IMAGE . $old_image);
				$image->resize($width, $height, $type);
				$image->save(DIR_IMAGE . $new_image);
			} else {
				copy(DIR_IMAGE . $old_image, DIR_IMAGE . $new_image);
			}
		}
		
		if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
			
				if (!isset($this->session->data['customer_info'])) {
					return $this->config->get('config_ssl') . 'image/' . $new_image;
				} else {
					return HTTPS_CATALOG . 'image/' . $new_image;
				}
			
		} else {
			
				if (!isset($this->session->data['customer_info'])) {
					return $this->config->get('config_url') . 'image/' . $new_image;
				} else {
					return HTTP_SERVER . 'image/' . $new_image;
				}
			
		}	
	}
}
?>

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm

Post by xlam » Wed May 28, 2014 7:56 pm

Did any body can help to fix it?

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm
Who is online

Users browsing this forum: No registered users and 11 guests