Many Undefined Variable/Index errors

Bug #232319 reported by TomSiemers
4
Affects Status Importance Assigned to Milestone
phpns
Confirmed
Low
Unassigned

Bug Description

I've been trying to try out phpns today. The install runs fine, but as soon as I access the home page I start getting error messages on the top of the screen.

Here are the errors that appear when I click on the article management tab after logging in as admin:

Notice: Undefined index: v in /var/www/html/phpns/manage.php on line 33
Notice: Undefined variable: row_bg in /var/www/html/phpns/manage.php on line 50
Notice: Undefined variable: table_rows in /var/www/html/phpns/manage.php on line 63
Notice: Undefined variable: cat_list in /var/www/html/phpns/inc/function.php on line 354
Notice: Undefined variable: selected_ in /var/www/html/phpns/inc/function.php on line 354
Notice: Undefined index: delete_success in /var/www/html/phpns/inc/function.php on line 542
Notice: Undefined variable: success in /var/www/html/phpns/inc/function.php on line 547
Notice: Undefined variable: cat_selected in /var/www/html/phpns/inc/function.php on line 555
Notice: Undefined variable: a_js in /var/www/html/phpns/inc/function.php on line 592
Notice: Undefined variable: a_js in /var/www/html/phpns/inc/function.php on line 592
Notice: Undefined index: page_image in /var/www/html/phpns/inc/themecontrol.php on line 75
Notice: Undefined variable: important_notice in /var/www/html/phpns/inc/themecontrol.php on line 115

Hope you can sort this out. Otherwise, looks like a nice program.

Tom

Revision history for this message
alecwh (alecwh) wrote : Re: [Bug 232319] [NEW] Many Undefined Variable/Index errors

Tom,

Thanks for the report, however, the notices you are recieving are not
errors, rather they are "notices." To fix them, you need to tune down
your PHP bug reporting to a lower level.

Google "PHP Error Reporting".

On Tue, 2008-05-20 at 19:27 +0000, TomSiemers wrote:
> Public bug reported:
>
> I've been trying to try out phpns today. The install runs fine, but as
> soon as I access the home page I start getting error messages on the top
> of the screen.
>
> Here are the errors that appear when I click on the article management
> tab after logging in as admin:
>
> Notice: Undefined index: v in /var/www/html/phpns/manage.php on line 33
> Notice: Undefined variable: row_bg in /var/www/html/phpns/manage.php on line 50
> Notice: Undefined variable: table_rows in /var/www/html/phpns/manage.php on line 63
> Notice: Undefined variable: cat_list in /var/www/html/phpns/inc/function.php on line 354
> Notice: Undefined variable: selected_ in /var/www/html/phpns/inc/function.php on line 354
> Notice: Undefined index: delete_success in /var/www/html/phpns/inc/function.php on line 542
> Notice: Undefined variable: success in /var/www/html/phpns/inc/function.php on line 547
> Notice: Undefined variable: cat_selected in /var/www/html/phpns/inc/function.php on line 555
> Notice: Undefined variable: a_js in /var/www/html/phpns/inc/function.php on line 592
> Notice: Undefined variable: a_js in /var/www/html/phpns/inc/function.php on line 592
> Notice: Undefined index: page_image in /var/www/html/phpns/inc/themecontrol.php on line 75
> Notice: Undefined variable: important_notice in /var/www/html/phpns/inc/themecontrol.php on line 115
>
> Hope you can sort this out. Otherwise, looks like a nice program.
>
>
> Tom
>
> ** Affects: phpns
> Importance: Undecided
> Status: New
>
--
Alec Henriksen <email address hidden> @ http://alecwh.com

alecwh (alecwh)
Changed in phpns:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Henning (henning-glatter-gotz) wrote :

Alec,

I was just about to report a bug on the same thing. The notices appear on practically every page starting with the very first one on the installation. The suggestion you make here to "tune down your PHP bug reporting to a lower level" is NOT a fix! That is simply a means to ignore potential problems. I think you have put out a really nice piece of work here and I am interested in using it. However, I believe turning off warnings to avoid them is a bad programming practice and is not very confidence inspiring.

You might want to really fix these warnings.

Cheers
Henning

Revision history for this message
KyleO (k-p-osborn) wrote : Re: [Phpns-team] [Bug 232319] Re: Many Undefined Variable/Index errors

Alec is just Alec. He's just far too lazy to go through and define every
variable. If he doesn't, I will. Or rather, I'll force him to.

-Kyle

On Sun, 2008-07-13 at 14:38 +0000, Henning wrote:
> Alec,
>
> I was just about to report a bug on the same thing. The notices appear
> on practically every page starting with the very first one on the
> installation. The suggestion you make here to "tune down your PHP bug
> reporting to a lower level" is NOT a fix! That is simply a means to
> ignore potential problems. I think you have put out a really nice piece
> of work here and I am interested in using it. However, I believe turning
> off warnings to avoid them is a bad programming practice and is not very
> confidence inspiring.
>
> You might want to really fix these warnings.
>
> Cheers
> Henning
>

Revision history for this message
alecwh (alecwh) wrote :

I might get around to this eventually, but these notices are not 'potential problems'. I agree that it is bad programming practice to not define your variables, however, two years ago I had not grasped this. For now my "workaround" will have to do. Thanks for the report, and I appreciate your input. Sincerely.

Changed in phpns:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.