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

[NovayaGazetaEuropeBridge]: fix warnings #4154

Merged
merged 1 commit into from
Jul 28, 2024
Merged

[NovayaGazetaEuropeBridge]: fix warnings #4154

merged 1 commit into from
Jul 28, 2024

Conversation

mazzz1y
Copy link
Contributor

@mazzz1y mazzz1y commented Jul 21, 2024

This MR introduces an additional check for the presence of the "blocks" property within JSON objects.

JSON responses contain entries that lack "blocks" property. Without this property, attempting to iterate over these objects with foreach triggers warnings such as:

NOTICE: PHP message: [2024-07-21 23:48:07] rssbridge.WARNING Undefined property: stdClass::$blocks at bridges/NovayaGazetaEuropeBridge.php line 49 
NOTICE: PHP message: [2024-07-21 23:48:07] rssbridge.WARNING foreach() argument must be of type array|object, null given at bridges/NovayaGazetaEuropeBridge.php line 49 

By adding this check, we prevent such warnings from cluttering the logs.

Copy link

Pull request artifacts

Bridge Context Status
NovayaGazetaEurope 1 untitled (current) ⚠️ WARNING Undefined property: stdClass::$blocks at bridges/NovayaGazetaEuropeBridge.php line 44
⚠️ WARNING foreach() argument must be of type arrayobject, null given at bridges/NovayaGazetaEuropeBridge.php line 44
NovayaGazetaEurope 1 untitled (pr) ✔️

last change: Sunday 2024-07-21 18:01:44

@dvikan dvikan merged commit 376e711 into RSS-Bridge:master Jul 28, 2024
7 checks passed
NotsoanoNimus pushed a commit to Solstice-Software/better-rss-bridge that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants