Post by ab-oc » Sun Nov 01, 2015 1:36 am

Hello,

I've trying to get a value, stored in settings table, to get into system/url.php...
If I try

Code: Select all

$this->config->get('config_error_log')...
I get the following error message:

Notice: Undefined property: Url::$config in /.../system/library/url.php on line 19
Fatal error: Call to a member function get() on a non-object in /.../system/library/url.php on line 19


So what to do to get the damn config_error_log??? ???

My url.php is:

Code: Select all

<?php
class Url {
	private $url;
	private $ssl;
	private $rewrite = array();
	
	public function __construct($url, $ssl = '') {
		$this->url = $url;
		$this->ssl = $ssl;
	}
		
	public function addRewrite($rewrite) {
		$this->rewrite[] = $rewrite;
	}
		
	public function link($route, $args = '', $connection = 'NONSSL') {

// NEW Code
		if ($this->config->get('config_error_log') == 1) {
			// New routine here
		}
// END

		if ($connection ==  'NONSSL') {
			$url = $this->url;
		} else {
			$url = $this->ssl;	
		}
		
		$url .= 'index.php?route=' . $route;
			
		if ($args) {
			$url .= str_replace('&', '&', '&' . ltrim($args, '&')); 
		}
		
		foreach ($this->rewrite as $rewrite) {
			$url = $rewrite->rewrite($url);
		}
				
		return $url;
	}
}
?>
Thank you very much for HELP

Andreas

New member

Posts

Joined
Tue Apr 29, 2014 11:22 pm
Who is online

Users browsing this forum: No registered users and 112 guests