Merge pull request #1268 from MrPetovan/bug/fatal-errors

[various] Fix hook function type-hints
pull/1269/head
Tobias Diekershoff 2022-06-27 06:40:50 +02:00 committed by GitHub
commit c0c15644a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -50,7 +50,7 @@ function mathjax_settings(App $a, array &$data)
];
}
function mathjax_footer(App $a, array &$b)
function mathjax_footer(App $a, string &$b)
{
// if the visitor of the page is not a local_user, use MathJax
// otherwise check the users settings.

View File

@ -17,7 +17,7 @@ function pageheader_install() {
Hook::register('page_content_top', __FILE__, 'pageheader_fetch');
}
function pageheader_addon_admin(App &$a, &$s)
function pageheader_addon_admin(App &$a, string &$s)
{
if (!$a->isSiteAdmin()) {
return;
@ -52,7 +52,7 @@ function pageheader_addon_admin_post(App $a)
}
}
function pageheader_fetch(App $a, array &$b)
function pageheader_fetch(App $a, string &$b)
{
if(file_exists('pageheader.html')){
$s = file_get_contents('pageheader.html');

View File

@ -80,12 +80,12 @@ function saml_install()
Hook::register('footer', __FILE__, 'saml_footer');
}
function saml_head(App $a, array &$b)
function saml_head(App $a, string &$b)
{
DI::page()->registerStylesheet(__DIR__ . '/saml.css');
}
function saml_footer(App $a, array &$b)
function saml_footer(App $a, string &$b)
{
$fragment = addslashes(BBCode::convert(DI::config()->get('saml', 'settings_statement')));
$b .= <<<EOL

View File

@ -24,12 +24,12 @@ function showmore_dyn_install()
Hook::register('addon_settings_post', __FILE__, 'showmore_dyn_settings_post');
}
function showmore_dyn_head(App $a, array &$b)
function showmore_dyn_head(App $a, string &$b)
{
DI::page()->registerStylesheet(__DIR__ . '/showmore_dyn.css');
}
function showmore_dyn_footer(App $a, array &$b)
function showmore_dyn_footer(App $a, string &$b)
{
DI::page()->registerFooterScript(__DIR__ . '/showmore_dyn.js');
}