mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 11:02:40 +00:00
Fixing display of core error messages
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4877 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
4b7e496446
commit
bb8c52dac0
14 changed files with 73 additions and 62 deletions
|
@ -473,7 +473,7 @@ class DboMysql extends DboSource {
|
|||
*/
|
||||
function generateSchema($schema, $table = null) {
|
||||
if (!is_a($schema, 'CakeSchema')) {
|
||||
trigger_error(__('Invalid schema object'), E_USER_WARNING);
|
||||
trigger_error(__('Invalid schema object', true), E_USER_WARNING);
|
||||
return null;
|
||||
}
|
||||
$out = '';
|
||||
|
|
|
@ -158,7 +158,7 @@ class DboSource extends DataSource {
|
|||
return $new;
|
||||
}
|
||||
/**
|
||||
* Convenience method for DboSource::listSources().
|
||||
* Convenience method for DboSource::listSources(). Returns source names in lowercase.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -318,7 +318,7 @@ class DboSource extends DataSource {
|
|||
* @see DboSource::fetchRow
|
||||
*/
|
||||
function fetchArray() {
|
||||
trigger_error(__('Deprecated: Use DboSource::fetchRow() instead'), E_USER_WARNING);
|
||||
trigger_error(__('Deprecated: Use DboSource::fetchRow() instead', true), E_USER_WARNING);
|
||||
return $this->fetchRow();
|
||||
}
|
||||
/**
|
||||
|
@ -326,7 +326,7 @@ class DboSource extends DataSource {
|
|||
* @see DboSource::fetchRow
|
||||
*/
|
||||
function one($sql) {
|
||||
trigger_error(__('Deprecated: Use DboSource::fetchRow($sql) instead'), E_USER_WARNING);
|
||||
trigger_error(__('Deprecated: Use DboSource::fetchRow($sql) instead', true), E_USER_WARNING);
|
||||
return $this->fetchRow($sql);
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -828,14 +828,16 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @return array Array of table metadata
|
||||
*/
|
||||
function loadInfo() {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
$db->cacheSources = $this->cacheSources;
|
||||
function loadInfo($clear = false) {
|
||||
if (!is_object($this->_tableInfo) || $clear) {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
$db->cacheSources = $this->cacheSources;
|
||||
|
||||
if (!is_object($this->_tableInfo) && $db->isInterfaceSupported('describe') && $this->useTable !== false) {
|
||||
$this->_tableInfo = new Set($db->describe($this));
|
||||
} elseif ($this->useTable === false) {
|
||||
return new Set();
|
||||
if ($db->isInterfaceSupported('describe') && $this->useTable !== false) {
|
||||
$this->_tableInfo = new Set($db->describe($this, $clear));
|
||||
} elseif ($this->useTable === false) {
|
||||
$this->_tableInfo = new Set();
|
||||
}
|
||||
}
|
||||
return $this->_tableInfo;
|
||||
}
|
||||
|
@ -1652,7 +1654,7 @@ class Model extends Overloadable {
|
|||
*/
|
||||
function validates($data = array()) {
|
||||
if (!empty($data)) {
|
||||
trigger_error(__('(Model::validates) Parameter usage is deprecated, set the $data property instead'), E_USER_WARNING);
|
||||
trigger_error(__('(Model::validates) Parameter usage is deprecated, set the $data property instead', true), E_USER_WARNING);
|
||||
}
|
||||
$errors = $this->invalidFields($data);
|
||||
if (is_array($errors)) {
|
||||
|
@ -1674,7 +1676,7 @@ class Model extends Overloadable {
|
|||
if (empty($data)) {
|
||||
$data = $this->data;
|
||||
} else {
|
||||
trigger_error(__('(Model::invalidFields) Parameter usage is deprecated, set the $data property instead'), E_USER_WARNING);
|
||||
trigger_error(__('(Model::invalidFields) Parameter usage is deprecated, set the $data property instead', true), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!isset($this->validate) || empty($this->validate)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue