Permalink
Browse files

modified for PHP 5.4 and Builtin web server

  • Loading branch information...
shin1x1 committed Dec 4, 2011
1 parent 3b27092 commit 9cbc30101c7d43221b88ea0d9fa66c2cfaa4f1d1
View
@@ -73,6 +73,9 @@
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
+ if (php_sapi_name() == 'cli-server') {
+ $_SERVER['PHP_SELF'] = '/'.basename(__FILE__);
+ }
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
View
@@ -25,7 +25,7 @@
if (!defined('E_DEPRECATED')) {
define('E_DEPRECATED', 8192);
}
-error_reporting(E_ALL & ~E_DEPRECATED);
+error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
require CORE_PATH . 'cake' . DS . 'basics.php';
$TIME_START = getMicrotime();
View
@@ -147,7 +147,7 @@ function ShellDispatcher($args = array()) {
function __initConstants() {
if (function_exists('ini_set')) {
ini_set('display_errors', '1');
- ini_set('error_reporting', E_ALL & ~E_DEPRECATED);
+ ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_STRICT);
ini_set('html_errors', false);
ini_set('implicit_flush', true);
ini_set('max_execution_time', 0);
@@ -166,7 +166,7 @@ function testLogFileWriting() {
*/
function testLoggingWithErrorHandling() {
@unlink(LOGS . 'debug.log');
- Configure::write('log', E_ALL & ~E_DEPRECATED);
+ Configure::write('log', E_ALL & ~E_DEPRECATED & ~E_STRICT);
Configure::write('debug', 0);
set_error_handler(array('CakeLog', 'handleError'));
@@ -149,7 +149,7 @@ function testSetErrorReportingLevel() {
Configure::write('debug', 2);
$result = ini_get('error_reporting');
- $this->assertEqual($result, E_ALL & ~E_DEPRECATED);
+ $this->assertEqual($result, E_ALL & ~E_DEPRECATED & ~E_STRICT);
$result = ini_get('display_errors');
$this->assertEqual($result, 1);
@@ -177,7 +177,7 @@ function testInteractionOfDebugAndLog() {
$this->assertEqual(ini_get('display_errors'), 0);
Configure::write('debug', 2);
- $this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED);
+ $this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED & ~E_STRICT);
$this->assertEqual(ini_get('display_errors'), 1);
Configure::write('debug', 0);

0 comments on commit 9cbc301

Please sign in to comment.