resposniveimage: php 8 compat fix for themes without breakpoints
This commit is contained in:
@@ -86,7 +86,7 @@ class serendipity_event_responsiveimages extends serendipity_event
|
|||||||
if (!is_object($serendipity['smarty'])) {
|
if (!is_object($serendipity['smarty'])) {
|
||||||
serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating
|
serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating
|
||||||
}
|
}
|
||||||
$this->breakpoints = $serendipity['smarty']->getTemplateVars('template_option')['breakpoints'];
|
$this->breakpoints = $serendipity['smarty']->getTemplateVars('template_option')['breakpoints'] ?? false;
|
||||||
if (! $this->breakpoints) {
|
if (! $this->breakpoints) {
|
||||||
$this->breakpoints = [1600, 1200, 600]; # This can be overwritten by the theme
|
$this->breakpoints = [1600, 1200, 600]; # This can be overwritten by the theme
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user