Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-22-2009, 03:51 PM   #1
teh ghey
Guest
 
Posts: n/a
Whats wrong with my php code?

I get this error" Parse error: parse error, unexpected '=', expecting ')' in /home/content/g/h/o/ghostingadmin/html/arktos/plugins/system/comments.php on line 34

here is the code. anyone know?

class ContactController extends JController
{
/**
* Display the view
*/
function display()
{
$document =& JFactory::getDocument();

$viewName = JRequest::getVar('view', 'category', 'default',
'cmd');
$viewType = $document->getType();

// in
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 03:54 PM   #2
teh ghey
Guest
 
Posts: n/a
this is in joomla btw
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 04:10 PM   #3
teh ghey
Guest
 
Posts: n/a
line 34 is function display()
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 04:12 PM   #4
who
So Fucking Banned
 
Join Date: Aug 2003
Location: ICQ #23642053
Posts: 19,593
$document =& JFactory::getDocument();

->

$document = JFactory::getDocument();
who is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 04:16 PM   #5
teh ghey
Guest
 
Posts: n/a
Quote:
Originally Posted by who View Post
$document =& JFactory::getDocument();

->

$document = JFactory::getDocument();
thank you!
So I take something out and put that in?
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 04:22 PM   #6
teh ghey
Guest
 
Posts: n/a
that code didnt work. but thanks though ;/
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 05:06 PM   #7
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally Posted by who View Post
$document =& JFactory::getDocument();

->

$document = JFactory::getDocument();
No. =& is explicit reference assignment, it isn't a typo.

teh ghey, I won't bore you with the technical details, but you are probably using PHP 4. Time to upgrade.

As an aside: when asking for help, give the whole bloody file. Seriously.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 05:12 PM   #8
teh ghey
Guest
 
Posts: n/a
Quote:
Originally Posted by Libertine View Post
No. =& is explicit reference assignment, it isn't a typo.

teh ghey, I won't bore you with the technical details, but you are probably using PHP 4. Time to upgrade.

As an aside: when asking for help, give the whole bloody file. Seriously.
last time I asked for help they said to just post the code block lol.
thanks
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 05:45 PM   #9
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally Posted by teh ghey View Post
last time I asked for help they said to just post the code block lol.
thanks
But I'm fairly sure they meant the right code block. Which this isn't.

Your problem is this:
function onGetComments($mode, &$item, &$params=null)

Which is valid in PHP 5 but not in 4, since in 5 default values can be passed by reference, which they can't in 4.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 05:52 PM   #10
teh ghey
Guest
 
Posts: n/a
Quote:
Originally Posted by Libertine View Post
But I'm fairly sure they meant the right code block. Which this isn't.

Your problem is this:
function onGetComments($mode, &$item, &$params=null)

Which is valid in PHP 5 but not in 4, since in 5 default values can be passed by reference, which they can't in 4.
wow you sound good. thanks
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.