Arrow

A couple of minor bugs | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
A couple of minor bugs
June 8, 2009
10:58 pm
Murray
Guest

I get the following 2 errors on the latest version….This is a new install.

Notice: Undefined index: sort in C:\\wamp\\www\\sport\\standings\\standings.php on line 145.

In the

standings/update.php?action=editscore

The field box shows

instead of the name of the field played on. The field has been loaded into the database as it is displayed in standings.php

As you can see I am running the program on localhost using the latest wamp load on Win XP SP3

regards

Murray

addition info...If I select a column header to sort on that field.. all is well. I suspect a default sort needs to be specified.

June 9, 2009
2:47 am
Peter
Admin
Forum Posts: 841
Offline

Hi,

My install doesn’t complain about that but I probably have a more lax PHP setup. So thanks for pointing these things out!

The first issue can be resolved by replacing line 145 with:

if (isset($_GET['sort'])) {
$standings_sort = intval($_GET['sort']);
}
else {
$standings_sort = 0;
}

The other issue can be solved by making the value of the input box on line 197 of admin_files/editscore.php to be:

<?php print $field;?>

Instead of what it was before (not sure how that got through):

<?print $field;?>
June 9, 2009
3:25 am
Murray
Guest

Thanks Peter,
I had worked out the second problem. Both are fine now.

Quick work