For now, I'll make use of images.
There's another problem in the same file, giving a warning in PHP7 and a fatal error in PHP8, this is related to the undefined constant 'OL_AUTHOR', which is present 4 times. It checks for the value of post_author, but 'OL_AUTHOR' is not defined. I've changed it to a constant, which is my author id ('1') and now it works.
From line 3404 I've added $ol_author = 1, and changed the 3 instances of OL_AUTHOR with $ol_author, like this:
There's a fourth instance of OL_AUTHOR. After you've done the above, you'll find it on line 3437. Change that also to $ol_author, like so:
Now, it's working. The post is created and the images are uploaded to your media library.