Philippe-dev / colorbox

A lightweight customizable jQuery lightbox plugin for Dotclear
0 stars 0 forks source link

$url non définie #2

Closed altairis-noe closed 1 year ago

altairis-noe commented 1 year ago

Coucou, j’ai une erreur en PHP 8.1 sur la ligne 136 de src/Frontend.php.

2023/06/28 09:25:39 [error] 1919557#1919557: *3870852 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, null given in /var/www/html/dotclear/src/Helper/Html/Html.php:98
Stack trace:
#0/var/www/html/dotclear/src/Helper/Html/Html.php(98): htmlspecialchars()
#1 /var/www/html/all_blogs/plugins/colorbox/src/Frontend.php(136): Dotclear\Helper\Html\Html::escapeJS()
#2 /var/www/html/dotclear/inc/core/class.dc.core.php(835): Dotclear\Plugin\colorbox\Frontend::publicFooterContent()
#3/var/www/html/dotclear/cache/cbtpl/9a/c4/9ac45bf4d63dba864d32f056934ac01a.php(67): dcCore->callBehavior()
#4 /var/www/html/dotclear/src/Helper/Html/Template/Template.php(503): include('...')
#5 /var/www/html/dotclear/inc/public/class.dc.template.php(250): Dotclear\Helper\Html\Template\Template->getData()

et, en effet, on y appelle Html::escapeJS($url), mais $url ne semble pas définie

Philippe-dev commented 1 year ago

Bien vu, merci :) Je corrigerai mieux sur la branche 2.27, en attendant tu peux ajouter ça vers la ligne 94 dans Frontend.php $url = dcCore::app()->blog->getQmarkURL() . 'pf=' . My::id();

Philippe-dev commented 1 year ago

Fixed in #b589a84