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

Prevent Exception #40122

Merged
merged 3 commits into from
May 8, 2023
Merged

Prevent Exception #40122

merged 3 commits into from
May 8, 2023

Conversation

janschoenherr
Copy link
Contributor

If $parts is null this will throw an exception in PHP 8+, a warning in PHP 7.

count(): Argument #1 ($value) must be of type Countable|array, null given

This can happen if the context is e.g. the default context text from the Joomla\CMS\HTML\Helpers\Content::prepare() function.

Pull Request for Issue #40121.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomdonation
Copy link
Contributor

I have tested this item ✅ successfully on 85341dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40122.

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 85341dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40122.

@alikon
Copy link
Contributor

alikon commented Mar 17, 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40122.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 17, 2023
@Hackwar Hackwar added the bug label Apr 8, 2023
@HLeithner HLeithner changed the base branch from 4.2-dev to 4.3-dev May 2, 2023 16:28
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 4.3-dev.

@obuisard
Copy link
Contributor

obuisard commented May 6, 2023

Hello @janschoenherr, can you check the conflict? Thank you!

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.3-dev labels May 8, 2023
@joomla-cms-bot joomla-cms-bot removed the NPM Resource Changed This Pull Request can't be tested by Patchtester label May 8, 2023
If $parts is `null` this will throw an exception.

```count(): Argument joomla#1 ($value) must be of type Countable|array, null given```

This can happen if the context is e.g. the default context `text` from the `Joomla\CMS\HTML\Helpers\Content::prepare()` function.
@janschoenherr
Copy link
Contributor Author

Conflicts are resolved. Thanks.

@laoneo laoneo merged commit 652222e into joomla:4.3-dev May 8, 2023
@laoneo
Copy link
Member

laoneo commented May 8, 2023

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 8, 2023
@laoneo laoneo added this to the Joomla! 4.3.2 milestone May 8, 2023
@janschoenherr janschoenherr deleted the patch-7 branch December 3, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants