Get started with PHP-Fusion

Start a New Thread

Users Participated

  • Kvido
    Post made: 3
  • Harlekin
    Post made: 4
  • Rolly8-HL
    Post made: 1

  1. PHP-Fusion Support Forums
  2. Development & Design
  3. Other Issues (9)

BBCode error

Other Issues (9) Can be weblinks, FaQ and other components that don´t have own forums here.

7 Replies 212 Views Last Updated on 9 days ago

Harlekin


Junior Member

#1

Posted 23 days ago

On PHP 7.1, i have this error in every unaktivated bbcode. Example is with center bbcode:
Fatal error: Uncaught Error: [] operator not supported for strings in ...center_bbcode_include_var.php:20

That is the line:
Code Gist: Download source  

$__BBCODE__[] =

Posts: 24

Joined: 22/03/2011

Rolly8-HL


Junior Member

#2

Posted 11 days ago

I have the same problem

Posts: 25

Joined: 18/03/2013

Kvido


Senior Member

#3

Posted 11 days ago

Should not there be this::

Code Gist: Download source  

$__BBCODE__[] = array(
    "description" => $locale['bb_center_description'], "value" => "center",
    "bbcode_start" => "[center]", "bbcode_end" => "[/center]",
    "usage" => "[center]".$locale['bb_center_usage']."[/center]"
);

Posts: 424

Joined: 01/08/2007

Harlekin


Junior Member

#4

Posted 11 days ago

That is the standard code and this work with PHP 5.6 and PHP 7.0.xx fine, but on PHP 7.1 the code make a fatal error.

Posts: 24

Joined: 22/03/2011

Kvido


Senior Member

#5

Posted 10 days ago

Try to v. 7.02:
center_bbcode_include_var.php:
Code Gist: Download source  

if (!defined("IN_FUSION")) { die("Access Denied"); }

$__BBCODE__[] =
array(
"description"      =>   $locale['bb_center_description'],
"value"         =>   "center",
"bbcode_start"      =>   "[center]",
"bbcode_end"      =>   "[/center]",
"usage"         =>   "[center]".$locale['bb_center_usage']."[/center]"
);
?>


center_bbcode_include.php:
Code Gist: Download source  

if (!defined("IN_FUSION")) { die("Access Denied"); }

$text = preg_replace('#\[center\](.*?)\[/center\]#si', '<div style=\'text-align:center\'>\1</div>', $text);
?>

Posts: 424

Joined: 01/08/2007

Harlekin


Junior Member

#6

Posted 10 days ago

The Fatal error is an error from PHP Version 7.1 The PHP 7.1 ist released in December 2016! You can read this here http://php.net/ar...16-12-01-3

PHP Fusion do not work with your code on PHP 7.1

The reason is. My webspace provider wrote me, i should update my site to a newer PHP Version. And the newest Version of PHP is 7.1 If i use the older PHP 7.0 i think i have the same trouble next year. So i will update my site to PHP 7.1
Edited by Harlekin on 08-01-2017 08:57

Posts: 24

Joined: 22/03/2011

Kvido


Senior Member

#7

Posted 10 days ago

Yes by the Administration:
Webserver like Apache / 2 April 10 (Debian)
PHP version 5.5.37-1 ~ + 7.1 dotdeb
PHP interface cgi-FCGI
MySQL server version 5.5.53-0 + deb8u1-log
PHP-Fusion version 9.02

Posts: 424

Joined: 01/08/2007

Harlekin


Junior Member

#8

Posted 9 days ago

This is in my Admin
Webserver Software = Apache
PHP Version = 7.1.0
PHP Oberfläche = fpm-fcgi
MySQL Server Version = 5.5.53-0 + deb8u1-log
PHP-Fusion Version = 9.02

edit:
I think, i have found the problem. In administration/bbcodes.php on line 171:
Code Gist: Download source  

$__BBCODE__ = "";


should be
Code Gist: Download source  

$__BBCODE__ = array();


Noe it works by me under PHP 7.1
Edited by Harlekin on 09-01-2017 18:53

Posts: 24

Joined: 22/03/2011

Jump to Forum:
8 users are online
0 member and 8 guests