Warnings

  • grafichero
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 weeks ago #2640 by grafichero
Warnings was created by grafichero
Hi Andrea, i just upgraded CP to the latest version in a developement site (made with Joomla 3.8.2 ), to try it with PHP 7 but I receive this warning:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; cpContentElement has a deprecated constructor in ..\administrator\components\com_customproperties\helpers\contentelement.class.php on line 176.
Furthermore in the menu item "Custom Property Layout" for each article found i have this warning:
Notice: Undefined property: stdClass::$created_by in ..\plugins\content\contact\contact.php on line 60
I don't know if there is a link between the two warnings, but in the menu item "Blog Category" with the same articles there is not the second warning.
Hope you can help me
Rita
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago - 7 years 2 weeks ago #2641 by andrea_4g
Replied by andrea_4g on topic Warnings
To state the obvious, since you are using a latter version of PHP, it is expected that some functions / constructs that were perfectly fine in previous versions of PHP are now considered deprecated.
However, since they are still viable functions / constructs, they work just as fine as before.

As a developer, whenever I see those warnings, I know I have to make modifications for the program to continue working with future versions of PHP.

The second notice message is thrown by standard joomla "Content - Contact" plugin. The plugin is looking for a field that is not provided by Custom Properties result items.
The plugin assumes that the field exists instead of checking for its existence before using it.

If you want to mute that error you can disable the Content - Contact Plugin.

(I see what I can do to "please" that plugin in a future version of Custom Properties)

In general, you should configure your hosting to not display 'Deprecated' warning messages, unless you are developing your own extension with consideration to forward compatibility.
Last edit: 7 years 2 weeks ago by andrea_4g.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #2663 by andrea_4g
Replied by andrea_4g on topic Warnings
Fixed with the recently released Custom Properties 3.1.28

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds