Merge pull request #13176 from MrPetovan/bug/warnings

Restore is_string() as a Smarty modifier
This commit is contained in:
Michael Vogel 2023-05-30 04:24:49 +02:00 committed by GitHub
commit 4246ffc892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -53,6 +53,10 @@ class FriendicaSmarty extends Smarty
$this->setConfigDir($work_dir . '/');
$this->setCacheDir($work_dir . '/');
$this->registerPlugin('modifier', 'is_string', function ($value) {
return is_string($value);
});
/*
* Enable sub-directory splitting for reducing directory descriptor
* size. The default behavior is to put all compiled/cached files into

View file

@ -8,7 +8,7 @@
{{$html nofilter}}
{{if $submit}}
<div class="settings-submit-wrapper panel-footer">
{{if $submit}}
{{if $submit|is_string}}
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
{{else}}
{{$count = 1}}

View file

@ -11,7 +11,7 @@
</div>
<div class="panel-footer">
{{if $submit}}
{{if $submit}}
{{if $submit|is_string}}
<button type="submit" name="{{$addon}}-submit" class="btn btn-primary settings-submit" value="{{$submit}}">{{$submit}}</button>
{{else}}
{{$count = 1}}