mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding bootstrap check for unique application salt value, and updating File error message
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4565 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f4172f0de3
commit
b81d297f5c
2 changed files with 10 additions and 4 deletions
|
@ -43,11 +43,19 @@ if (!defined('PHP5')) {
|
|||
require LIBS . 'security.php';
|
||||
require LIBS . 'inflector.php';
|
||||
require LIBS . 'configure.php';
|
||||
require LIBS . 'debugger.php';
|
||||
$paths = Configure::getInstance();
|
||||
Configure::store(null, 'class.paths');
|
||||
Configure::load('class.paths');
|
||||
Configure::write('debug', DEBUG);
|
||||
/**
|
||||
* Enter description here...
|
||||
* Verify that the application's salt has been changed from the default value
|
||||
*/
|
||||
if (CAKE_SESSION_STRING == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
|
||||
trigger_error('Please change the value of CAKE_SESSION_STRING in app/config/core.php to a salt value specific to your application', E_USER_NOTICE);
|
||||
}
|
||||
/**
|
||||
* Get the application path and request URL
|
||||
*/
|
||||
if (empty($uri) && defined('BASE_URL')) {
|
||||
$uri = setUri();
|
||||
|
@ -95,8 +103,6 @@ if (!defined('PHP5')) {
|
|||
}
|
||||
}
|
||||
|
||||
Configure::write('debug', DEBUG);
|
||||
|
||||
require CAKE . 'dispatcher.php';
|
||||
|
||||
if (defined('CACHE_CHECK') && CACHE_CHECK === true) {
|
||||
|
|
|
@ -103,7 +103,7 @@ class File extends Object{
|
|||
function write($data, $mode = 'w') {
|
||||
$file = $this->getFullPath();
|
||||
if (!($handle = fopen($file, $mode))) {
|
||||
print ("[File] Could not open $file with mode $mode!");
|
||||
trigger_error("[File] Could not open {$file} with mode {$mode}!", E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue