]> source.dussan.org Git - nextcloud-server.git/commit
Avoid substr() error when strpos returns false
authorbladewing <lukas@ifflaender-family.de>
Tue, 14 Jul 2020 21:10:53 +0000 (23:10 +0200)
committerlui87kw <lukas.ifflaender@uni-wuerzburg.de>
Wed, 15 Jul 2020 08:18:47 +0000 (10:18 +0200)
commit7dafd5831fad2c2be79c3df81fb973c00ec76287
tree72388b772fe6d159ab973f84e4531a7eb49c801d
parent3e8087bff1584e33f328486c36fd2a8255286bad
Avoid substr() error when strpos returns false

"Exception: substr() expects parameter 3 to be int, bool given" can occur on Line 378 $mimePart = substr($icon, 0, strpos($icon, '-'));
This happens, when '-' is not found and strpos returns false instead of an int.
When this occurs, e.g., Activity hangs.

Signed-off-by: lui87kw <lukas.ifflaender@uni-wuerzburg.de>
lib/private/Files/Type/Detection.php