• Resolved tigertech

    (@tigertech)


    After updating to MaxButtons 8.6 a customer of ours who is (unwisely) still using PHP 5.6 saw this error:

    PHP Fatal error: Default value for parameters with a class type hint can only be NULL in /wp-content/plugins/maxbuttons/classes/block.php on line 193

    That appears to be caused by this change:

    --- /wp-content/plugins/maxbuttons/classes/block.php 2021-02-26
    +++ /wp-content/plugins/maxbuttons/classes/block.php 2021-05-28
    @@ -190,7 +190,7 @@
        *
        *   @return $css Array
        */
    -   public function parse_css($css, $mode = 'normal', $screens) {
    +   public function parse_css($css, $screens, string $mode = 'normal') {
    
            $data = $this->getBlockData();

    That code only works with PHP 7.0 and later.

Viewing 1 replies (of 1 total)
  • Plugin Author Bas Schuiling

    (@basszje)

    Hi,

    Thanks for the message. We didn’t realize early enough that it wouldn’t work with PHP version 5.x . We’ve upped the required PHP version to 7, since PHP 5.x is quite end of life.

    Sorry about that!

    • This reply was modified 3 years, 5 months ago by Bas Schuiling.
Viewing 1 replies (of 1 total)
  • The topic ‘MaxButtons 8.6 incompatible with PHP 5.6’ is closed to new replies.