Skip to content
Permalink
Browse files
Merge branch 'MDL-62907' of https://github.com/stronk7/moodle
  • Loading branch information
David Monllaó committed Apr 17, 2019
2 parents 0423ed4 + 65453b9 commit 6289f6afe3d59fe824ad91c3ab36f56fb822e235
Showing with 5 additions and 1 deletion.
  1. +1 −1 admin/tool/log/classes/helper/reader.php
  2. +4 −0 admin/tool/log/store/standard/tests/store_test.php
@@ -73,7 +73,7 @@ public function get_description() {
* @param string $other Other value
* @return mixed Decoded value
*/
public static function decode_other(string $other) {
public static function decode_other(?string $other) {
if ($other === 'N;' || preg_match('~^.:~', $other)) {
return unserialize($other);
} else {
@@ -374,6 +374,10 @@ public function test_decode_other($value) {
$this->assertEquals($value, \logstore_standard\log\store::decode_other(json_encode($value)));
}

public function test_decode_other_with_wrongly_encoded_contents() {
$this->assertSame(null, \logstore_standard\log\store::decode_other(null));
}

/**
* List of possible values for 'other' field.
*

0 comments on commit 6289f6a

Please sign in to comment.