From 003f175c83a05b04d0b8fae3dcac9a5651283906 Mon Sep 17 00:00:00 2001 From: Yevhenii Kostiuk Date: Sat, 27 Oct 2018 14:38:52 +0300 Subject: [PATCH 1/2] fix bugs, that occurreds fatal errors --- tests/lib/Traits/EncryptionTrait.php | 4 ++-- tests/startsessionlistener.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php index ba759a51a2880..55c518c173fd1 100644 --- a/tests/lib/Traits/EncryptionTrait.php +++ b/tests/lib/Traits/EncryptionTrait.php @@ -23,8 +23,8 @@ trait EncryptionTrait { abstract protected function registerStorageWrapper($name, $wrapper); // from phpunit - abstract protected function markTestSkipped($reason = ''); - abstract protected function assertTrue($condition, $message = ''); + abstract protected function markTestSkipped(string $message = ''); + abstract protected function assertTrue($condition, string $message = ''); private $encryptionWasEnabled; diff --git a/tests/startsessionlistener.php b/tests/startsessionlistener.php index 24a72db0065d0..cf9a0341d08e8 100644 --- a/tests/startsessionlistener.php +++ b/tests/startsessionlistener.php @@ -18,7 +18,7 @@ class StartSessionListener implements TestListener { use TestListenerDefaultImplementation; - public function endTest(Test $test, $time) { + public function endTest(Test $test, float $time) :void { // reopen the session - only allowed for memory session if (\OC::$server->getSession() instanceof Memory) { /** @var $session Memory */ From 67a26df82dd3cddf38121acfae06c1436a9f741b Mon Sep 17 00:00:00 2001 From: Yevhenii Kostiuk Date: Sat, 27 Oct 2018 15:55:50 +0300 Subject: [PATCH 2/2] fix - Add to favorites not working in IE11 - polyfill needed #12007 --- core/js/js.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/js/js.js b/core/js/js.js index fd6e0a68da530..eb4362fcfb65c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -2428,3 +2428,9 @@ jQuery.fn.tipsy = function(argument) { } return this; }; + +/** + * Add to favorites not working in IE11 - polyfill needed #12007 + * @link https://github.com/nextcloud/server/issues/12007 + */ +if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; } \ No newline at end of file