TalkPHP
 
 
Account Login
Latest Articles
» How to keep your forms from double posting data
» cURL Basics
» Securing your PHP applications Part 1
» The way the function rolls
» Database Abstraction with Zend_Db - Part 2
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack (13) Thread Tools Display Modes
Old 06-18-2008, 01:14 PM   #21 (permalink)
The Addict
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 234
Thanks: 5
Kalle is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
I must admit, I don't understand that error. The only thing I can think of is that type-casting wasn't available in PHP 4? It's a while since I used it so I have completely forgotten. Any help would be appreciated.

The function setSize looks like the following:

php Code:
public function setSize($iSize)
{
    $this->m_iSize = (int) $iSize;
    return $this;
}
Type casting was available as of PHP4, however it might be the new PHP5 keywords causing the error, even though I would expect an "Unexpected T_STRING" insted
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 06-18-2008, 01:42 PM   #22 (permalink)
The Wanderer
 
ciprianmp's Avatar
 
Join Date: Jun 2008
Location: Bucharest, Romania
Posts: 14
Thanks: 6
ciprianmp is on a distinguished road
Arrow -> setSize(80) - fix for php4

Quote:
Originally Posted by Kalle View Post
Type casting was available as of PHP4, however it might be the new PHP5 keywords causing the error, even though I would expect an "Unexpected T_STRING" insted
That error came up on a php 4.3.11 server. Afterwards, I saw that server doesn't accept remote access for file(), file_exists(), is_file() or filesize() functions (allow_url_fopen is "On" though)

It had sometihng to do with the format of the class call:
PHP Code:
 $pAvatar = new TalkPHP_Gravatar();
 echo 
$pAvatar -> setEmail('example@example.com')
     -> 
setSize(80)
     -> 
setRating(GRAVATAR_RATING_PG)
     -> 
getAvatar(); 
threw the error on that server, while there is no error anymore after changing it to:
PHP Code:
$pAvatar = new TalkPHP_Gravatar();
   
$pAvatar->setEmail('example@example.com');
   
$pAvatar->setSize(80);
   
$pAvatar->setRating(GRAVATARS_RATING_PG);
   echo 
$pAvatar->getAvatar(); 
As you can see, it works fine now on Latest Developing version - phpMyChat-Plus (4.3.11 server)

PS: does anyone know what could be the disabled setting which makes file, file_exists, filesize and is_file not to work with remote files? They work just fine with local files though...

Last edited by ciprianmp : 09-10-2008 at 07:02 AM.
ciprianmp is offline  
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.talkphp.com/script-giveaway/1905-gravatar-wrapper-class.html
Posted By For Type Date
Automattic Acquired Gravatar — WP Assist This thread Refback 01-13-2008 09:01 PM
Gravatar 3.0, Powered by Automattic | SYP This thread Refback 01-13-2008 04:14 AM
ShadowReality This thread Refback 01-10-2008 02:06 PM
GRavatar plugin for WordPress and WordPress-MU | Ring Of Blogs This thread Refback 01-09-2008 09:31 PM
Automattic Acquires Gravatar | CenterNetworks - Web 2.0 News, Opinions and Insights from New York This thread Refback 01-09-2008 08:00 PM
Gravatar: Globally Recognized Avatars » Webmaster-Source This thread Refback 01-09-2008 02:43 PM
Support WordPress by Displaying Gravatars On Your Blog This thread Refback 01-09-2008 12:35 PM
Now Gravatar Powered. | Act of War: Warfare Re-defined This thread Refback 01-09-2008 06:08 AM
» This Site Now Gravatar-Enabled! » DragonFlyEye.Net This thread Refback 01-09-2008 06:05 AM
MyChores Journal » Blog Archive » User icons provided by Gravatar This thread Refback 01-09-2008 05:22 AM
Do you have your gravatar yet ? This thread Refback 01-09-2008 04:12 AM
Automattic Gets Gravatar - and Valuation « Changing Way This thread Refback 01-09-2008 03:31 AM
Automattic Acquired Gravatar — WP Assist This thread Refback 01-09-2008 03:12 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:54 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0