-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.0] Contacts Fatal Error #20709
Comments
This is due the fact that the Registry class doesn't allow null values anymore. More information about this topic can be found in #20675. The consequence is that every instantiate or merge needs to be surrounded by an if block. So
|
@laoneo It may be another discussion but perhaps the Registry should return an empty Registry object? |
@mbabker is here the man in charge. I really don't care at all as long as we make a proper announcement when we are more strict in J4 than J3, as this class is used widely in core and 3rd party extensions. |
No, constructor still allow you to put empty string or null. On J4, you can use: $registry = new Registry('');
$registry = new Registry(null); but you can not: $registry = (new Registry())->loadString('');
$registry = (new Registry())->loadString(null); Take a look at the constructor at https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/vendor/joomla/registry/src/Registry.php#L65 Currently, |
Ok then I was wrong. Not sure if Michael is pushing that change into 2.x. |
For me 2.x should be strict. |
As I said. I'm fine with both options. Np. |
The CMS is behind a bit on some of the Composer dependencies in 4.0. As far as the framework repos go everything committed to master (1.x) is being merged regularly into the 2.0-dev branches, so there are few if any behavioral differences aside from intended changes. We just need to |
Small reminder: we also have the fatal error concerning the class declaration here, and same for Newsfeeds. 😃 |
has this been resolved? |
Did #20802 fix this issue? |
Closing as this has indeed been solved. |
Steps to reproduce the issue
Multilingual: displaying a single contact which was inserted in an article via xtd (a single contact menu item works fine)
0 Argument 1 passed to Joomla\Registry\Registry::merge() must be an instance of Joomla\Registry\Registry, null given, called in /Applications/MAMP/htdocs/newfolder/joomla40/components/com_contact/Model/ContactModel.php on line 118
Displaying a contact category from a List All Contact Categories menu item page
PHP Fatal error: Cannot declare class Joomla\Component\Contact\Site\Helper\Route, because the name is already in use in /Applications/MAMP/htdocs/newfolder/joomla40/components/com_contact/helper/route.php on line 23
Trying to display a Contact category from a single contact page => 404
These errors also present after merging #20692
The text was updated successfully, but these errors were encountered: