We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db715df commit 5ead00bCopy full SHA for 5ead00b
src/DbRow.php
@@ -219,7 +219,9 @@ public function _dbLoadIfNotLoaded(): void
219
*/
220
public function get(string $var)
221
{
222
- $this->_dbLoadIfNotLoaded();
+ if (!isset($this->primaryKeys[$var])) {
223
+ $this->_dbLoadIfNotLoaded();
224
+ }
225
226
return $this->dbRow[$var] ?? null;
227
}
@@ -445,7 +447,7 @@ public function _getPrimaryKeys(): array
445
447
446
448
/**
449
* Sets the values of the primary key.
- * This is set when the object is in "loaded" state.
450
+ * This is set when the object is in "loaded" or "not loaded" state.
451
*
452
* @param mixed[] $primaryKeys
453
0 commit comments