[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 » Mon Aug 16, 2010 4:48 pm

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: 14759
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 » Tue Aug 17, 2010 7:23 pm

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