Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-18-2006, 11:38 AM
New Pligger
 
Join Date: Jan 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Notices

I am getting a lot of the following PHP notices/warnings in my Apache error log:

For instance:

Undefined index: category in /home/pligg/libs/html1.php on line 136

This is the section of code:

Code:
foreach ($categories as $category) {
                        echo '<li><a href="/category/'.$category->category_id.'/">';
                        if($category->category_id == $_REQUEST['category'])
This is a non fatal error. An inelegant solution is:

Code:
foreach ($categories as $category) {
         echo '<li><a href="/category/'.$category->category_id.'/">';
         if(empty($_REQUEST['category'])) echo  _($category->category_name);
         else {
                        if($category->category_id == $_REQUEST['category']) {
                                echo '<strong>' . _($category->category_name). '</strong>';
                                $globals['category_id'] = $category->category_id;
                                $globals['category_name'] = $category->category_name;
                        } else
                                echo  _($category->category_name);
        } //end of else
Having fixed that, I could see more, similar warnings:

Undefined property: user_level in /home/pligg/libs/link.php on line 279
Undefined index: page in /home/pligg/libs/utils.php on line 69

Unfortunately, hacking these issues will make it hard/impossible to upgrade.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Errors tcritic General Help 1 08-15-2007 01:28 PM
Submitting stories...again kingp Installation and Upgrade Help 5 05-07-2007 12:58 PM
cann't vote in pligg (buliding 802) haxhax Bug Report 27 03-10-2007 06:53 AM
dreamhost and validation image problem Xanatos Installation and Upgrade Help 17 01-17-2007 01:14 PM
/var/log/httpd/error_log messages gr8rcake Bug Report 3 01-28-2006 09:28 PM


Search Engine Friendly URLs by vBSEO 3.2.0