TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: gouri on April 04, 2010, 05:35:06 PM

Title: [bugtracker] Undefined variable error for avatar_height & avatar_width
Post by: gouri on April 04, 2010, 05:35:06 PM
I Have encountered the error after the updation of the forum from SMF 1.1.11 to SMF 2.0 RC3 and then Installed the TP 1.0 Beta 5

In Tinyportal tab frontpage I selected the option  "Forum-posts and articles - sorted on date"

Then I am getting the errors filled in error log

QuoteGuest
66.249.71.229   
Type of error: Undefined
http://tweak2.com/index.php?
8: Undefined variable: avatar_height
File: /home/******/public_html/Sources/TPortal.php
Line: 1659

Guest
66.249.71.229   
Type of error: Undefined
http://tweak2.com/index.php?
8: Undefined variable: avatar_width
File: /home/*****/public_html/Sources/TPortal.php
Line: 1659

So I opened the TPortal.php from Sources folder and navigated to the articles

Quoteelseif(in_array($context['TPortal']['front_type'], array('forum_articles', 'forum_selected_articles')))

And added observed that all other if conditions defined avatar_height and avatar_width depending on some condtion but this one doesn't

So added the blank variables to the starting of the above quoted elseif condition. And this solved the problem.

Quote$avatar_height='';
$avatar_width='';

Here is the forum topic discussed on this http://www.tinyportal.net/index.php?topic=32240.0