Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING
Old 04-01-2009, 06:00 PM Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING
Skilled Talker

Posts: 90
Name: Dominic
Location: Columbus, Ohio
Trades: 0
Hello, my friend is currently running a vBulletin Forum (3.7.4) and he is using a custom theme. When anyone goes to someones profile you will see at the top this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/XXXX/domains/XXXX/public_html/includes/class_profileblock.php(252) : eval()'d code on line 68

}

/**
* Abstract Class for Profile Blocks
*
* @package vBulletin
*/
class vB_ProfileBlock
{
/**
* Registry object
*
* @var vB_Registry
*/
var $registry;

/**
* User Profile Object
*
* @var vB_UserProfile
*/
var $profile;

/**
* Factory Object
*
* @var vB_ProfileBlockFactory
*/
var $factory;

/**
* Default Options for the block
*
* @var array
*/
var $option_defaults = array();

/**
* The name of the template to be used for the block
*
* @var string
*/
var $template_name = '';

/**
* Variables to automatically prepare

This is the file where it talks about the error from Line: 68 to Line: 113

Please let me know if you need more lines or any questions.

**ALSO** If your wondering how I have access to the files and he is running it, it's because I have his Control Panel password.

Thanks
__________________
Hi Mom
Hi Dad
dominic95 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2009, 12:17 PM Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRI
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
I bet the error is on line 67. Please show a bit more of the code.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 04-02-2009, 03:24 PM Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRI
Skilled Talker

Posts: 90
Name: Dominic
Location: Columbus, Ohio
Trades: 0
Okay, I'll go get it right now.

Okay From 54 to 67:

/**
* Fetches a Profile Block object
*
* @param string The name of the class
*/
function &fetch($class)
{
if (!isset($this->cache["$class"]) OR !is_object($this->cache["$class"]))
{
$classname = "vB_ProfileBlock_$class";
$this->cache["$class"] =& new $classname($this->registry, $this->profile, $this);
}

return $this->cache["$class"];


This is 67 return $this->cache["$class"];
__________________
Hi Mom
Hi Dad

Last edited by dominic95; 04-02-2009 at 03:27 PM..
dominic95 is offline
Reply With Quote
View Public Profile
 
Old 04-02-2009, 03:50 PM Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRI
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
I don't see any reason why $class needs to be quoted. Try cache[$class]
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-02-2009, 06:22 PM Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRI
Skilled Talker

Posts: 90
Name: Dominic
Location: Columbus, Ohio
Trades: 0
Nope, still get the same error.
__________________
Hi Mom
Hi Dad
dominic95 is offline
Reply With Quote
View Public Profile
 
Old 04-02-2009, 06:42 PM Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRI
jamestl2's Avatar
No scale-itch here...

Latest Blog Post:
Wordpress Relative URLs Plugin
Posts: 2,389
Name: <member type="brilliant" alt="foolish">James Lewitzke</member>
Location: / public_html / Universe / Virgo_Supercluster / Local_Group / Milky_Way / Orion_Arm / Solar_System / Earth / North_America / USA / Wisconsin
Trades: 0
It's a little hard to see without the entire file's code. Is it possible you could post that?

Also, does the function close with a squiggly bracket ( } )?
__________________
Engipress -
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
for Wordpress Projects
jamestl2 is offline
Reply With Quote
View Public Profile Visit jamestl2's homepage!
 
Reply     « Reply to Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17680 seconds with 12 queries