Topic: Errors with PHP 7.0

Hello, when i switch from php 5.6 to php 7.0 i get these errors on the top of the forum :
"Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DBLayer has a deprecated constructor in /xxx.com/punbb/include/dblayer/mysqli.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /xxx.com/punbb/include/dblayer/mysqli.php:16) in /xxx.com/punbb/header.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /xxx.com/punbb/include/dblayer/mysqli.php:16) in /xxx.com/punbb/header.php on line 17 Warning: Cannot modify header information - headers already sent by (output started at /xxx.com/punbb/include/dblayer/mysqli.php:16) in /xxx.com/punbb/header.php on line 18 Warning: Cannot modify header information - headers already sent by (output started at /xxx.com/punbb/include/dblayer/mysqli.php:16) in /xxx.com/punbb/header.php on line 19 Warning: Cannot modify header information - headers already sent by (output started at /xxx.com/punbb/include/dblayer/mysqli.php:16) in /xxx.com/punbb/header.php on line 22"

and at the beginning of the topics list in a forum, these errors :
"Warning: gmdate() expects parameter 2 to be integer, float given in /xxx.com/punbb/include/functions.php on line 453 Warning: gmdate() expects parameter 2 to be integer, float given in /xxx.com/punbb/include/functions.php on line 457 Warning: gmdate() expects parameter 2 to be integer, float given in /xxx.com/punbb/include/functions.php on line 472"

These errors will be fixed in the next version ? Anyway to fix it ?
Thanks,

Pierre

Re: Errors with PHP 7.0

http://punbb.ru/post46186.html#p46186

ForkBB
I speak only Russian  :P

Re: Errors with PHP 7.0

Maybe you could find here is the soluce in English : http://punbb.informer.com/forums/post/155990/#p155990

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Errors with PHP 7.0

Thanks MaraKat, it works fine with php 7.1 now smile

Re: Errors with PHP 7.0

There are sometimes, this type of error has arisen, that, at the time of the web page development, it has shown some error with the PHP 7.0 version, at that time, if you want, you may go with for the alternates one to make and develop the web pages and websites.

Re: Errors with PHP 7.0

Replace in the file include/dblayer/mysqli.php
(If you use MySQLi database)

    function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $foo)

on

    function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $foo)

If you use another database type, you can do it replacement in other files.