qTranslate-Team/qtranslate-x

Php 7 compatibility issues

omargourari opened this issue · 2 comments

Using the plugin with PHP 7 generates some compatibility issues:

( ! ) Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; qTranslateXWidget has a deprecated constructor in qtranslate-x/qtranslate_widget.php on line 30

( ! ) Warning: Cannot modify header information - headers already sent by (output started at qtranslate-x/qtranslate_widget.php:30) in qtranslate-x/qtranslate_core.php on line 384

Notice: Undefined property: stdClass::$0 in qtranslate-x/qtranslate_core.php on line 1422

Do you plan to expand support even for php 7?

Tusko commented

the same error

Deprecated
: Methods with the same name as their class will not be constructors in a future version of PHP; qTranslateXWidget has a deprecated constructor in
/home/tusko/http_pub/0_dev/zhuk.devpreview.xyz/wp-content/plugins/qtranslate-x/qtranslate_widget.php
on line
30

Warning
: Cannot modify header information - headers already sent by (output started at /home/tusko/http_pub/0_dev/zhuk.devpreview.xyz/wp-content/plugins/qtranslate-x/qtranslate_widget.php:30) in
/home/tusko/http_pub/0_dev/zhuk.devpreview.xyz/wp-content/plugins/qtranslate-x/qtranslate_core.php
on line
384

Thank you very much for the report. It will be fixed in the next release.
If you wish to fix it temporarily in your installation, replace line

function qTranslateXWidget() {

with line

function __construct() {