mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixes issue with Sql Server driver when loading fixtures
Sqlserver::describe is expecting a model object (Unlike other drivers which work with either a object or string). While this does work under normal conditions, it causes a "Trying to get property of non-object" notice when using fixtures. The same problem also causes the testLimitOffsetHack test to fail. This change does a simple test to ensure that the $model variable is an object before trying to access a property of it. All SqlServer tests are now passing.
This commit is contained in:
parent
d466e00644
commit
2dd3cecfaa
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ class Sqlserver extends DboSource {
|
|||
}
|
||||
|
||||
$fields = array();
|
||||
$schema = $model->schemaName;
|
||||
$schema = is_object($model) ? $model->schemaName : false;
|
||||
|
||||
$cols = $this->_execute(
|
||||
"SELECT
|
||||
|
|
Loading…
Reference in a new issue