1 (edited by zetrader 2020-07-27 16:50)

Topic: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

Hello, yesterday i've seen punbb published a new version : 1.4.5, my board notified me of this new version only yesterday.
So i downloaded it and  uploaded my punbb 1.4.4 that was making a lot of errors with php 7.2
There are less errors with punbb 1.4.5, but there a still one on each topic :
PHP Warning: count(): Parameter must be an array or an object that implements Countable in zeforums.com/include/parser.php on line 814

I've seen than Visman updated punbb 1.4.4 a lot for php versions on his own in github, made a lot of fixes (Thank you Visman), i decided to give a try and then updated another time with punbb visman : no error with php 7.2
I've tried with php 7.4, and still no error.
So the problem is : we know have a "punbb 1.4.5" that is less advanced than "punbb 1.4.4" by Visman.
To not receive a notification of punbb 1.4.5 available (but older for php versions), before updating to punbb 1.4.4 by visman, i just changed in admin/db_update.php (in punbb 1.4.4 by visman) :

define('UPDATE_TO', '1.4.4');

to :

define('UPDATE_TO', '1.4.5');

Very confused to see a punbb 1.4.4 more advanced than the official 1.4.5, i prefer punbb 1.4.4 by visman as it's more advanced in fixes.
i didn't see any things new in punbb 1.4.5, they are only talking of php 7.x fixes

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

I don't know who published punbb 1.4.5 on the main site.

PunBB 1.4.5 has been released

Version 1.4.5 offers: support for php 7+

Dowloads: get PunBB 1.4.5 on Downloads page.

Posted on 2020-01-31    <==== O_o 

I don't know any official punbb developer at the moment.

On github, the last commit from 2017 https://github.com/punbb/punbb/commits/master

Parserus, UserAgentAnalyzer.
I speak only Russian  :P

3 (edited by zetrader 2020-07-27 18:40)

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

I know, it has appeared yesterday but displaying date "2020-01-31", i've been watching the last weeks, nothing, still 1.4.4.
Like it's officiel, it appeared on my board in admin that there is a new version of PunBB.
Very strange, indeed, in github, nothing new, and looking at the changelog of punbb 1.4.5 once downloaded, nothing new, still written 1.4.4, comparing, some files have changed since 1.4.4, but very few. It seems like some little fixes for php 7.x but less than your version of punbb.

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

Another thing, both punbb 1.4.5 and your fixed version lack the "strikethrough text" basic function.
I remember i tried 2 years ago, a punbb version that have this function (as del_bb extension is old and didn't work) :
https://github.com/punbb/punbb/issues/153
It worked nice, but now that version is old (2017) and lack your fixes for php until 7.4.
So i plan to apply thoses changes to your version, to integrate the "strikethrough text" function by default when installing  :
https://github.com/apmuthu/PunBB/commit … 1f196b161a
What do you think about it? Phpbb has this function by default, punbb should have, and not a heavy code.

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

New bb code can be added via extension.

There is confusion in the commit: "Strikethrough text" uses the <s> tag, but why is the bb-code written as [ del ]?

There is a <del> tag, which is deleted text, and for strikethrough text it is better to use [s] bb-code.

Parserus, UserAgentAnalyzer.
I speak only Russian  :P

6 (edited by zetrader 2020-07-28 13:09)

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

As you talk about doing with an extension (i don't know how to create an extension making those changes), if you can show me some explanation how to apply some changes through an extension, i'll be glad to see that, hoping it's not too much complicated wink, i tried again the old extension del_bb 1.0 :
https://punbb.informer.com/forums/topic … ough-text/
And this time (with your punbb version), it works smile
I don't remember what was the problem, but i'm glad to see it can work again.

Edit : i have this error in the help bbcode section with that extension :

Warning: array_merge(): Expected parameter 2 to be an array, null given in /zeforums.com/help.php(92) : eval()'d code on line 17

Any idea to correct this?

In the manifest.xml, about help section, i see this code :

<hook id="he_new_bbcode_text_style"><![CDATA[
            if (!isset($del_bbc)) {
                if ($forum_user['language'] != 'English' && file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/del_bbc.php')) {
                    require $ext_info['path'].'/lang/'.$forum_user['language'].'/del_bbc.php';
                } else {
                    require $ext_info['path'].'/lang/English/del_bbc.php';
                }
            }
            $lang_help = array_merge($lang_help, $del_bbc);
?>
            <div class="entry-content">
                <code>[del]<?php echo $del_bbc['text'] ?>[/del]</code><span><?php echo $lang_help['produces'] ?><br /></span>
                <?php echo $del_bbc['product'] ?>
            </div>
<?php
        ]]>
        </hook>

line 17 of help.php i see that :

($hook = get_hook('he_start')) ? eval($hook) : null;

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

del_bb/lang/English/del_bbc.php
replace

    $fontsize = array(

to

    $del_bbc = array(
Parserus, UserAgentAnalyzer.
I speak only Russian  :P

Re: Punbb 1.4.5 error with php 7.2 : Visman punbb works with 7.2 and 7.4

Thanks, now there's no error in bbcode help and it displays correctly the help (in french in my forum) cool