Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7 Warnings #293

Closed
acs-ferreira opened this issue Mar 27, 2016 · 9 comments
Closed

PHP7 Warnings #293

acs-ferreira opened this issue Mar 27, 2016 · 9 comments

Comments

@acs-ferreira
Copy link
Contributor

@acs-ferreira acs-ferreira commented Mar 27, 2016

When adding/editing a Menu (K2 Categories Listing):

Warning: Declaration of K2Element::render() should be compatible with JFormField::render($layoutId, $data = Array) in /administrator/components/com_k2/elements/base.php on line 24

Some similar warnings on the Frontend of type

K2Element::render() should be compatible with JFormField::render($layoutId, $data = Array)

No issues/warnings on PHP 5.6.

@fevangelou

This comment has been minimized.

Copy link
Member

@fevangelou fevangelou commented Mar 27, 2016

Add this as well: http://www.joomlaworks.net/forum/k2-en/45109-php-7-warning-calendar-has-a-deprecated-constructor

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
Calendar has a deprecated constructor in /public_html/modules/mod_k2_tools/includes/calendarClass.php on line 32
@kavadas

This comment has been minimized.

Copy link
Contributor

@kavadas kavadas commented Mar 28, 2016

@acs-ferreira

Both issues have been fixed with:

5a9ae0a
5dc22b8

Please use the development version and verify that it works.

@acs-ferreira

This comment has been minimized.

Copy link
Contributor Author

@acs-ferreira acs-ferreira commented Mar 28, 2016

Can't confirm for CALENDAR as i'm not using it.

The only WARNINGS (not errors) i can seen now are:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgSystemK2Filter has a deprecated constructor in public/plugins/system/k2filter/k2filter.php on line 15

This on also trigger this one:

Warning: Cannot modify header information - headers already sent by (output started at /public/plugins/system/k2filter/k2filter.php:15) in /public/libraries/joomla/input/cookie.php on line 94

Then these ones on other pages:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor in /srv/users/serverpilot/apps/dev/public/administrator/components/com_k2/lib/JSON.php on line 127
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in /public/administrator/components/com_k2/lib/JSON.php on line 794
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in /public/administrator/components/com_k2/lib/JSON.php on line 806
@kavadas

This comment has been minimized.

Copy link
Contributor

@kavadas kavadas commented Mar 28, 2016

The first two are not coming from K2 files.

The rest of them are fixed now with this 65979d4 .

@acs-ferreira

This comment has been minimized.

Copy link
Contributor Author

@acs-ferreira acs-ferreira commented Mar 28, 2016

OK thanks.

I'll confirm 65979d4 later.

@acs-ferreira

This comment has been minimized.

Copy link
Contributor Author

@acs-ferreira acs-ferreira commented Mar 28, 2016

65979d4 is OK.

I've tested it with https://github.com/sstalle/php7cc and no errors had been stated, but some warnings.

This should be performed and fixed in the whole component.

@fevangelou

This comment has been minimized.

Copy link
Member

@fevangelou fevangelou commented Mar 28, 2016

More reported in the AllVideos issue tracker:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor /administrator/components/com_k2/lib/JSON.php on line 127

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in //administrator/components/com_k2/lib/JSON.php on line 794

/cc @kavadas

@acs-ferreira

This comment has been minimized.

Copy link
Contributor Author

@acs-ferreira acs-ferreira commented Mar 29, 2016

@fevangelou Those should be fixed already with 65979d4 cc @kavadas

@kavadas

This comment has been minimized.

Copy link
Contributor

@kavadas kavadas commented Mar 29, 2016

I am closing this issue since all reported errors should have been fixed with the latest commits.

@kavadas kavadas closed this Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.