[PATCH] Errors when editing/adding a faq that is not in a ca

Please report bugs here!

Moderator: Thorsten

Post Reply
bram
Posts: 19
Joined: Mon Aug 16, 2010 12:54 pm

[PATCH] Errors when editing/adding a faq that is not in a ca

Post by bram »

NOTE: I'm not sure if this patch is still relevant since the code appears to be changed between 2.6.7 and the HEAD in git...

When editing a FAQ that was not added in a category I got the errors:
* PHP recoverable error: Argument 1 passed to PMF_Faq::addCategoryRelations() must be an array, null given, called in /opt/supfaq/admin/record.save.php...
* PHP recoverable error: Argument 2 passed to PMF_Category::addPermission() must be an array, null given, called in /opt/supfaq/admin/record.save.php...
* PHP recoverable error: Argument 2 passed to PMF_Category::addPermission() must be an array, null given, called in /opt/supfaq/admin/record.save.php...

When adding a FAQ that without selecting a category I got the error:
'Administration of Records
An error occurred.'

When previewing a FAQ without selecting a category I got the errors:
- PHP warning: Invalid argument supplied for foreach() in record.add.php on line 144
- PHP warning: Invalid argument supplied for foreach() in record.add.php on line 165

Attached is a diff on 2.6.7.
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: [PATCH] Errors when editing/adding a faq that is not in a ca

Post by Thorsten »

Hi,

thanks for the patch, I reviewed it and added to phpMyFAQ 2.6.8.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply