Conditions | 4 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function setValue($value, $record = null, $markChanged = true) |
||
37 | { |
||
38 | $this->setEncryptionAad($record); |
||
39 | |||
40 | // Return early if we keep encrypted value in memory |
||
41 | if (!EncryptHelper::getAutomaticDecryption()) { |
||
42 | $this->value = $value; |
||
43 | return $this; |
||
44 | } |
||
45 | |||
46 | // $markChanged is not used |
||
47 | // The value might come encrypted from the database |
||
48 | if ($value && EncryptHelper::isEncrypted($value)) { |
||
49 | $this->value = $this->decryptValue($value); |
||
50 | } else { |
||
51 | $this->value = $value; |
||
52 | } |
||
53 | return $this; |
||
54 | } |
||
56 |