Closed CHCCD closed 2 years ago
Are you adding a new file? A new image?
Or are you just editing the article, and an image/file were already included there?
Permissions problem
If File upload not set ,On admin panel edit article have the error.
Error: TypeError: is_uploaded_file(): Argument #1 ($filename) must be of type string, null given in file /modules/publisher/class/Utility.php line 1144
I can't reproduce it:
But I didn't have any attachments (no files and no images), that's why I've asked if you had any of those...
Wait, I think, I understand what you're saying. Let me test it without the "File upload" permission.... Are you trying to allow users to submit articles but without the permission to attach files?
Change the line 1144 to this:
if ($helper->getConfig('perm_upload') && \is_uploaded_file(($_FILES['item_upload_file']['tmp_name'])??'')) {
This will fix it
Thanks for reporting the issue!
My server PHP 8.0.14 XOOPS 2.5.11-Beta2 The url
xoop_url/modules/publisher/admin/item.php?op=mod&itemid=1
When admin edit article on submit,have A problem has occurred on our server! message: Error: TypeError: is_uploaded_file(): Argument #1 ($filename) must be of type string, null given in file /modules/publisher/class/Utility.php line 1144