Skip to content

Commit e7daf40

Browse files
authored
Merge pull request #16110 from phalcon/model-property
Make `Phalcon\Mvc\Model:uniqueTypes` always array
2 parents 60dff68 + 3b6d02e commit e7daf40

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

phalcon/Mvc/Model.zep

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface,
157157
protected uniqueParams = [];
158158

159159
/**
160-
* @var array|null
161-
* TODO: Make it always array in code
160+
* @var array
162161
*/
163-
protected uniqueTypes = null;
162+
protected uniqueTypes = [];
164163

165164
/**
166165
* Phalcon\Mvc\Model constructor
@@ -3914,7 +3913,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface,
39143913
var automaticAttributes, attributeField, bindSkip, bindDataTypes,
39153914
bindType, bindTypes, columnMap, dataType, dataTypes, field, fields,
39163915
manager, nonPrimary, newSnapshot, success, primaryKeys, snapshot,
3917-
snapshotValue, uniqueKey, uniqueParams, uniqueTypes, value, values,
3916+
snapshotValue, uniqueKey, uniqueParams, value, values,
39183917
updateValue;
39193918
bool changed, useDynamicUpdate;
39203919

@@ -4094,8 +4093,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface,
40944093
}
40954094

40964095
let uniqueKey = this->uniqueKey,
4097-
uniqueParams = this->uniqueParams,
4098-
uniqueTypes = this->uniqueTypes;
4096+
uniqueParams = this->uniqueParams;
40994097

41004098
/**
41014099
* When unique params is null we need to rebuild the bind params
@@ -4156,7 +4154,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface,
41564154
[
41574155
"conditions" : uniqueKey,
41584156
"bind" : uniqueParams,
4159-
"bindTypes" : uniqueTypes
4157+
"bindTypes" : this->uniqueTypes
41604158
],
41614159
bindTypes
41624160
);

0 commit comments

Comments
 (0)