Merge pull request #95 from fiwswe/strpos_bug

Correctly interpret result of strpos(…)
This commit is contained in:
Andreas Gohr 2022-10-11 15:09:26 +02:00 committed by GitHub
commit 47c3b88a4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ class tpl {
$linktarget = wl($data['id'], $data['params'], false, '&');
}
$caption = $lang['btn_' . $data['type']];
if(strpos($caption, '%s')) {
if(strpos($caption, '%s') !== false) {
$caption = sprintf($caption, $data['replacement']);
}