[PATCH] Warnings when exporting an empty category to PDF/exp

Please report bugs here!

Moderator: Thorsten

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

[PATCH] Warnings when exporting an empty category to PDF/exp

Post by bram » Mon Aug 16, 2010 4:47 pm

Currently there are warnings when an empty category is exported to PDF:
- PHP notice: Undefined index: XXX in Wrapper.php on line 416

=> Fix this by always setting the category id and name

There are also warnings when an faq that is not in a category is exported to PDF: (the faq was returned by a search)
- PHP notice: Undefined index: XXX in Wrapper.php on line 416
- PHP notice: Undefined offset: XXX in Wrapper.php on line 454

=> fix this by checking if the category id exists in the categories array.


Attached is a patch for this (0006-Fix-warnings-in-pdf-export.patch)
NOTE: this patch was originally written on 2.6.7. It is untested on the git HEAD.
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] Warnings when exporting an empty category to PDF/exp

Post by Thorsten » Tue Aug 17, 2010 7:18 pm

Hi,

thanks for the patch! Reviewed and added to phpMyFAQ 2.6.8.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply