SMF 1.0.12 and action to modify a event on several days of calendar.

Started by xtlmx, March 01, 2008, 08:05:55 AM

Previous topic - Next topic

xtlmx

I search but I did find a report on my trouble.

When a member modify his event I got this pb on my logerror, on each day except the first.

8: Undefined index: ID_MEMBER_POSTER
Fichier: /home/immersio/www/ixforum/Sources/Post.php
Ligne: 1481

and in my moderation log
(Modify)        (Today)
Modifié     Aujourd'hui à 12:01:24     X     Webmestre     IP
topic: From pas là du 3 au 11 message: 90371 member: Fromage    (first day of event ok)
   Modifié    Aujourd'hui à 11:59:57    X   Webmestre    IP
topic: From pas là du 3 au 11 message: 90371 member:                  (member missing)
   Modifié    Aujourd'hui à 11:59:13    X    Webmestre    IP
topic: From pas là du 3 au 11 message: 90371 member:
   Modifié    Aujourd'hui à 11:58:45    X    Webmestre    IP
topic: From pas là du 3 au 11 message: 90371 member:

As you can see member is empty for the day 2 at 4


The issue seems to be in post.php l1391 $row is crashed by a new SQL request. If I name $row2 insted of $row I don t get an error.

Thanks for advices.

SleePy

It may be a bug in 1.0. But I would suggest upgrading to 1.1 if at all possible.

If you want to test something
Open Post.php

Find:

            // Get the event's poster.
            $request = db_query("
                SELECT ID_MEMBER
                FROM {$db_prefix}calendar
                WHERE ID_EVENT = $_REQUEST[eventid]", __FILE__, __LINE__);
            $row = mysql_fetch_assoc($request);
            mysql_free_result($request);

            // Silly hacker, Trix are for kids. ...probably trademarked somewhere, this is FAIR USE! (parody...)
            isAllowedTo('calendar_edit_' . ($row['ID_MEMBER'] == $ID_MEMBER ? 'own' : 'any'));


Replace with:

            // Get the event's poster.
            $request = db_query("
                SELECT ID_MEMBER
                FROM {$db_prefix}calendar
                WHERE ID_EVENT = $_REQUEST[eventid]", __FILE__, __LINE__);
            $allowrow = mysql_fetch_assoc($request);
            mysql_free_result($request);

            // Silly hacker, Trix are for kids. ...probably trademarked somewhere, this is FAIR USE! (parody...)
            isAllowedTo('calendar_edit_' . ($allowrow['ID_MEMBER'] == $ID_MEMBER ? 'own' : 'any'));
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: