- Issue created by @scampbell1
- 🇺🇸United States scampbell1 New York
I created a VERY rough patch that seems to have eliminated the PHP warnings I was seeing by adding a bunch of isset and is_null if statements.
This is just a starting point.
- 🇦🇺Australia kenwest
Inspecting @scampbell1's patch I see a few issues where the fixes perhaps go too far?
- podcast.module
- Adding the test if (isset( $value['value'])) prevents $out being set. The existing test should be modified to if ($content = $value['value'] ?? "")
- src/Plugin/views/row/RssFields.php
- When adding a podcast:soundbite element, the code already skips that step when $soundbite_start is null. Setting it to "" circumvents that test and causes a podcast:soundbite element to be added to the podcast
- Merge request !16Fix PHP warnings when generating a podcast with no Podcasting 2.0 elements set → (Open) created by kenwest
- 🇦🇺Australia kenwest
I've created an issue fork. MR 16 fixes the warning generated when viewing a podcast that has not yet had any Podcasting 2.0 elements defined
- podcast_process_nested_channel_element() may receive a $value without an 'attributes' element
- Harden podcast_process_nested_channel_element() to receive a $value without a 'value' element (unlikely but why not?)
- Add podcast:funding_text_field to the options array
- In the $form 'podcast:value_type_field' et al are nested under 'podcast:payments' but they aren't nested in $this->options
- The podcast:season, podcast:episode, podcast:soundbite_start, podcast:soundbite_description, podcast:soundbite_duration and podcast:person may not be set. Prevent PHP throwing warnings by testing the result of buildElementFromOptions(). Note that buildElementFromOptions() returns an array with 'key' and 'value' elements - or an empty array is there is no element.
- Also fixed typos - itunes:season and itunes:episode
- 🇦🇺Australia kenwest
Added another commit to MR 16. Rss::buildOptionsForm() - not all $form elements have a '#type' so allow for that.
- 🇵🇱Poland besek
I had the same issue - dblog was flooded with thousands of warnings. I had to downgrade module to previous version
I'm happy to help with testing when fix is prepared