PodcastGenerator / PodcastGenerator

Open Source Podcast Publishing Solution since 2006
http://www.podcastgenerator.net
GNU General Public License v3.0
584 stars 157 forks source link

PHP Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given #467

Closed jdiercks closed 2 years ago

jdiercks commented 2 years ago

System Information Podcast Generator Version: 3.1.3 Webserver: Apache PHP Version: 8.0.15

Podcast Generator Config

<?php

$podcastgen_version = "3.1.3"; // Version

$first_installation = ***;

$installationKey = "***";

$scriptlang = "en_US";

$url = "***";

$absoluteurl = "***"; // The location on the server

$theme_path = "themes/default/";

$upload_dir = "media/"; // "media/" the default folder (Trailing slash required). Set chmod 755

$img_dir = "images/"; // (Trailing slash required). Set chmod 755

$feed_dir = ""; // Where to create feed.xml (empty value = root directory). Set chmod 755

$max_recent = all; // How many file to show in the home page

$recent_episode_in_feed = "All"; // How many file to show in the XML feed (1,2,5 etc.. or "All")

$episodeperpage = 10;

$enablestreaming = "yes"; // Enable mp3 streaming? ("yes" or "no")

$freebox = "yes"; // enable freely customizable box

$enablepgnewsinadmin = "yes";

$strictfilenamepolicy = "no"; // strictly rename files (just characters A to Z and numbers) 

$categoriesenabled = "no";

$cronAutoIndex = 1; //Auto Index New Episodes via Cron

$cronAutoRegenerateRSS = 1; //Auto regenerate RSS via Cron

$indexfile = "index.php";    // Path of the index file

$podcastPassword = "";       // Password to protect the podcast generator webpages, this will NOT protect the audio or XML files. Leave blank to disable.

#####################

# XML Feed stuff

$podcast_title = "***";

$podcast_subtitle = "***";

$podcast_description = "***";

$author_name = "***";

$author_email = "***";

$itunes_category[0] = "***"; // iTunes categories (mainCategory:subcategory)

$itunes_category[1] = "";

$itunes_category[2] = "";

$link = "?name="; // permalink URL of single episode (appears in the <link> and <guid> tags in the feed)

$feed_language = "en";

$copyright = "All rights reserved";   // Your copyright notice (e.g CC-BY)

$feed_encoding = "utf-8";

$explicit_podcast = "no"; //does your podcast contain explicit language? ("yes" or "no")

$users_json = "***";

Description of your problem:

Getting this in admin/error_log when uploading:

[28-Feb-2022 19:29:03 America/Boise] PHP Warning:  Undefined array key "category" in /home1/marincov/public_html/podcast/admin/episodes_upload.php on line 36
[28-Feb-2022 19:29:03 America/Boise] PHP Fatal error:  Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given in /home1/marincov/public_html/podcast/admin/episodes_upload.php:36
Stack trace:
#0 {main}
  thrown in /home1/marincov/public_html/podcast/admin/episodes_upload.php on line 36
coldacid commented 2 years ago

Funny enough, the same thing was fixed but in a different file back in November. I should have a new release out to fix this shortly.

coldacid commented 2 years ago

This should now be fixed in version 3.1.4, let me know if you have any issues.

jdiercks commented 2 years ago

Thanks for the quick response.... if I try to install 3.1.4 I get "Please refresh", but refresh doesn't fix it. Reverting to 3.1.3 gets it back to where it was.

coldacid commented 2 years ago

I screwed up something with the release, try 3.1.4.1 that I just released.

jdiercks commented 2 years ago

Works! Thanks again.