Когда вношу правки на сайте и после сохранения сайт падает в логах ошибка
[Mon Jan 11 21:43:37 2016] [error] [client ] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home//www/core/model/modx/modx.class.php on line 2412
[Mon Jan 11 21:43:37 2016] [error] [client ] PHP Fatal error: Class 'modContext_' not found in /home//www/core/xpdo/xpdo.class.php on line 770
[Mon Jan 11 21:45:42 2016] [error] [client ] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home//www/core/model/modx/modx.class.php on line 2412, referer: http://ххх.ru/manager/?a=66
[Mon Jan 11 21:45:42 2016] [error] [client ] PHP Fatal error: Class 'modContext_' not found in /home//www/core/xpdo/xpdo.class.php on line 770, referer: http://ххх.ru/manager/?a=66
[Mon Jan 11 21:45:43 2016] [error] [client ] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home//www/core/model/modx/modx.class.php on line 2412
[Mon Jan 11 21:45:43 2016] [error] [client ] PHP Fatal error: Class 'modContext_' not found in /home//www/core/xpdo/xpdo.class.php on line 770
Сами функции, по которым ссылается на ошибку
По строке 2412
/**
* Loads the modX system configuration settings.
*
* @access protected
* @return boolean True if successful.
*/
protected function _loadConfig() {
$this->config= $this->_config;
$this->getCacheManager();
$config = $this->cacheManager->get('config', array(
xPDO::OPT_CACHE_KEY => $this->getOption('cache_system_settings_key',
null, 'system_settings'),
xPDO::OPT_CACHE_HANDLER =>
$this->getOption('cache_system_settings_handler', null,
$this->getOption(xPDO::OPT_CACHE_HANDLER)),
xPDO::OPT_CACHE_FORMAT => (integer)
$this->getOption('cache_system_settings_format', null,
$this->getOption(xPDO::OPT_CACHE_FORMAT, null,
xPDOCacheManager::CACHE_PHP))
));
if (empty($config)) {
$config = $this->cacheManager->generateConfig();
}
if (empty($config)) {
$config = array();
if (!$settings= $this->getCollection('modSystemSetting')) {
return false;
}
foreach ($settings as $setting) {
$config[$setting->get('key')]= $setting->get('value');
}
}
/**строка 2414*/ $this->config = array_merge($this->config, $config);
$this->_systemConfig= $this->config;
return true;
}
По строке 770
/**
* Creates a new instance of a specified class.
*
* All new objects created with this method are transient until {@link
* xPDOObject::save()} is called the first time and is reflected by the
* {@link xPDOObject::$_new} property.
*
* @param string $className Name of the class to get a new instance of.
* @param array $fields An associated array of field names/values to
* populate the object with.
* @return object|null A new instance of the specified class, or null if a
* new object could not be instantiated.
*/
public function newObject($className, $fields= array ()) {
$instance= null;
/**строка 770*/ if ($className= $this->loadClass($className)) {
$className .= '_' . $this->config['dbtype'];
if ($instance= new $className ($this)) {
if (is_array($fields) && !empty ($fields)) {
$instance->fromArray($fields);
}
}
}
return $instance;
}
Удален 18.01.2016 20:13 #
В /home//www/core/xpdo/xpdo.class.php (770 строка) modContext_ переименуйте обратно в modContext (уберите подчеркивание)У вас с настройками базы что-то
должно давать modContext_mysql (или какую базу используете), а у вас $this->config['dbtype'] пустой