问题
After I've upgraded PHP to 5.4, PHP complains about E_STRICT. My VPS has Ubuntu 12.04 installed. It has a lot of .ini-files, and I've changed all error_reporting to:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
I've also restarted the Apache-webserver. Phpinfo tells me that ~E_STRICT not is blocked (error_reporting => 22527 => 22527)
I know: the best option is to change de code. All & references has been removed.
In the following list, the log:
Strict (2048): Declaration of BeanstalkdSource::create() should be compatible with DataSource::create(Model $model, $fields = NULL, $values = NULL) [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 396]
Strict (2048): Declaration of BeanstalkdSource::read() should be compatible with DataSource::read(Model $model, $queryData = Array, $recursive = NULL) [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 396]
Strict (2048): Declaration of BeanstalkdSource::update() should be compatible with DataSource::update(Model $model, $fields = NULL, $values = NULL, $conditions = NULL) [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 396]
Strict (2048): Declaration of BeanstalkdSource::delete() should be compatible with DataSource::delete(Model $model, $id = NULL) [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 396]
Strict (2048): Only variables should be passed by reference [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 382]
DETAILS:
Strict (2048): Declaration of BeanstalkdSource::create() should be compatible with DataSource::create(Model $model, $fields = NULL, $values = NULL) [APP/Plugin/Queue/Model/Datasource/BeanstalkdSource.php, line 396]
Code Context
if (file_exists($file)) {self::_map($file, $className, $plugin); return include $file;
App::load() - CORE/Cake/Core/App.php, line 563
App::load() - CORE/Cake/Core/App.php, line 563
spl_autoload_call - [internal], line ??
class_exists - [internal], line ??
ConnectionManager::loadDataSource() - CORE/Cake/Model/ConnectionManager.php, line 179
ConnectionManager::getDataSource() - CORE/Cake/Model/ConnectionManager.php, line 96
Model::getDataSource() - CORE/Cake/Model/Model.php, line 3245
Model::__call() - CORE/Cake/Model/Model.php, line 800
Job::put() - APP/Event/ScenarioModifiedListener.php, line 75
ScenarioModifiedListener::StartPdfScenarioJob() - APP/Event/ScenarioModifiedListener.php, line 75
ScenarioModifiedListener::StartPdfJob() - APP/Event/ScenarioModifiedListener.php, line 58
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 248
ScenarioModifiedBehavior::afterSave() - APP/Model/Behavior/ScenarioModifiedBehavior.php, line 84
ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 132
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 248
来源:https://stackoverflow.com/questions/21318634/disabling-e-strict-errors-in-cakephp-beanstalk