Fixing issue where reference fatal is thrown with PHP 5.0.5

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7552 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2008-09-04 13:35:04 +00:00
parent 927950e81c
commit 46620f8ee2
2 changed files with 8 additions and 6 deletions

View file

@ -40,7 +40,7 @@
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 2);
Configure::write('debug', 1);
/**
* Application wide charset encoding
*/
@ -150,7 +150,7 @@
/**
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
Configure::write('Security.salt', 'cakeDYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
@ -226,4 +226,4 @@
*
*/
Cache::config('default', array('engine' => 'File'));
?>
?>

View file

@ -257,8 +257,10 @@ class HtmlHelper extends AppHelper {
* @return string A meta tag containing the specified character set.
*/
function charset($charset = null) {
$charset = current(array_filter(array($charset, strtolower(Configure::read('App.encoding')), 'utf-8')));
return $this->output(sprintf($this->tags['charset'], $charset));
if (empty($charset)) {
$charset = strtolower(Configure::read('App.encoding'));
}
return $this->output(sprintf($this->tags['charset'], (!empty($charset) ? $charset : 'utf-8')));
}
/**
* Creates an HTML link.
@ -637,4 +639,4 @@ class HtmlHelper extends AppHelper {
return $out;
}
}
?>
?>