FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » undefined constant "s" (bug or my bad understanding?)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
undefined constant "s" (bug or my bad understanding?) [message #16919] Sun, 29 February 2004 16:21 Go to next message
oblomov is currently offline  oblomov   Italy
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
Hi,

still trying to use fudforum classes and functions to integrate it in my mailing list manager / archiver. I'm at a good point (can archive the message but still not the attachment) but step into a strange problem with the function managing post user update, I get a

users.inc error message


<br />
<b>Notice</b>: Use of undefined constant s - assumed 's' in <b>//write_directory/fudforum/2945491008/include/theme/default/users.inc</b > on line <b>32</b><br />



this is the incriminated code:

<?php
$u
= db_sab("SELECT
            s.id AS sid, s.data, s.returnto,
            t.id AS theme_id, t.lang, t.name AS theme_name, t.locale, t.theme, t.pspell_lang, t.theme_opt,                                                                                                          
            u.alias, u.posts_ppg, u.time_zone, u.sig, u.last_visit, u.last_read, u.cat_collapse_status, u.users_opt, u.ignore_list, u.ignore_list, u.buddy_list, u.id, u.group_leader_list, u.email, u.login
            FROM phpgw_fud_ses s
            INNER JOIN phpgw_fud_users u ON u.id=(CASE WHEN s.user_id>2000000000 THEN 1 ELSE s.user_id END)
            INNER JOIN phpgw_fud_themes t ON t.id=u.theme WHERE s.ses_id='"
.s."'");
?>


looks like that 's' in the final line (line 31...) is a mistake as it is used outside quotes while is the table alias, I'm really not sure about it because I don't understand why it works posting through the forum then... I must miss something...





[Updated on: Sun, 29 February 2004 16:26]

Report message to a moderator

Re: undefined constant "s" (bug or my bad understanding?) [message #16922 is a reply to message #16919] Sun, 29 February 2004 19:28 Go to previous messageGo to next message
oblomov is currently offline  oblomov   Italy
Messages: 12
Registered: February 2004
Karma: 0
Junior Member
ok, in fact the error is showing just if I put

<?php
error_reporting
(E_ALL);
?>


and my system is in fact working but that piece of code still puzzles me Razz
Re: undefined constant "s" (bug or my bad understanding?) [message #16968 is a reply to message #16922] Sun, 07 March 2004 00:37 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This is a user authentication query, it should not run.
You need to make sure 'forum_debug' is defined to 1 at the start of the script.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: problems with maillist.php (mailing list 2 forum)
Next Topic: I messed it up!!!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:20:16 GMT 2024

Total time taken to generate the page: 0.02630 seconds