bugGNU FM - Bugs: bug #26651, error when trying to access...

 
 

bug #26651: error when trying to access profile that doesnot exist

Submitter:  Ankur Shrivastava <ankurs>
Submitted:  Sat 23 May 2009 07:08:59 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 03 Jun 2009 07:59:40 PM UTC, comment #2: 

Fixed on dev.

Jørgen Bøhnsdalen <jurgbohn>
Group Member
Mon 25 May 2009 10:02:58 AM UTC, comment #1: 

I reckon the attached patch should fix this.

Not tested I'm afraid as I haven't been able to get my own instance of libre.fm working yet.

While it's probably better to handle non-existent users with exceptions, the code doesn't appear to handle this anywhere yet. This solution should work as pages which instantiate User() check for the existence of $user->name to confirm that the user exists.

(file #18198)

David Johnson <dj1471>
Sat 23 May 2009 07:08:59 PM UTC, original submission:  

Shows error when trying to access an non existing user like http://alpha.libre.fm/user/abcxyz

Fatal error: Uncaught exception 'Exception' with message 'ERROR SELECT * FROM Users WHERE lower(username) = 'abcxyz'' in /home/librefm/web/data/User.php:58 Stack trace: #0 /home/librefm/web/user-profile.php(35): User->__construct('abcxyz') #1 {main} thrown in /home/librefm/web/data/User.php on line 58

Ankur Shrivastava <ankurs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jurgbohn (Posted a comment)
  • -email is unavailable- added by dj1471 (Updated the item)
  • -email is unavailable- added by ankurs (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-03 jurgbohn StatusNone Fixed
        Open/ClosedOpen Closed
    2009-05-25 dj1471 Attached File- Added fix-invalid-user-exception.patch, #18198

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code