May 17, 2012, 01:40:41 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

Erro: 8: Undefined index: username

 (Read 4961 times)
0 Members and 1 Guest are viewing this topic.
Mr. Jinx
Jr. Member
**

Points: 0
Offline Offline

Posts: 6


« on: October 29, 2007, 03:20:56 »

In the SMF errorlog you'll see the following error:
Code:
8: Undefined index: username
....forum/Sources/Search.php
Row: 1752

Looking at the code SEO4SMF inserted, it seems ['ID_MEMBER']]['username'] doesn't exist?

Code:
$context['search_results'][]=array('id'=>$message['ID_TOPIC'],'subject'=>$message['subject'],'board_id'=>$message['ID_BOARD'],'board_name'=>$message['bName'],'member_name'=>$memberContext[$message['ID_MEMBER']]['username'],'member_id'=>$message['ID_MEMBER'],'last_member_name'=>$message['last_member_name'],'last_member_id'=>$message['last_member_id']);[/coder]
« Last Edit: November 02, 2007, 09:48:28 by Mr. Jinx » Logged


fred
Newbie
*

Points: 0
Offline Offline

Posts: 2


« Reply #1 on: December 03, 2007, 15:16:23 »

I've the same Error - it seems like it happens when Users use the Search-Function without adding a username to search for.

Code:
http://forum.com/index.php?action=search2
8: Undefined index: username
Datei: /web/1/000/014/366/10275/htdocs/borntobooze-forum/Sources/Search.php
Zeile: 1748

My Line 1748:
Code:
$context['search_results'][]=array('id'=>$message['ID_TOPIC'],'subject'=>$message['subject'],'board_id'=>$message['ID_BOARD'],'board_name'=>$message['bName'],'member_name'=>$memberContext[$message['ID_MEMBER']]['username'],'member_id'=>$message['ID_MEMBER'],'last_member_name'=>$message['last_member_name'],'last_member_id'=>$message['last_member_id']);
Logged
Mr. Jinx
Jr. Member
**

Points: 0
Offline Offline

Posts: 6


« Reply #2 on: January 05, 2008, 11:01:30 »

I modified that line to:

Code:
$context['search_results'][]=array('id'=>$message['ID_TOPIC'],'subject'=>$message['subject'],'board_id'=>$message['ID_BOARD'],'board_name'=>$message['bName'],'member_id'=>$message['ID_MEMBER'],'last_member_name'=>$message['last_member_name'],'last_member_id'=>$message['last_member_id']);

And it seems to work fine now. No errors, en search works ok.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!