×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Parse error: syntax error, unexpected T_OBJECT_OPE

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 10 months ago #4851

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
/home/aivanov/public_html/gorbostroyka/administrator/components/com_comment/toolbar.comment.html.php on line 29
function existsAkoTable()
{
JFactory::getDBO()->setQuery();
}
to
function existsAkoTable()
{
$database = JFactory::getDBO();
$database->setQuery('');
}

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 10 months ago #4852

  • Alex
  • Alex's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 39
  • Thank you received: 0
ummm...
I'm on version 4

I have no toolbar.comment.html.php file

I have comment.php but there is no existsAkoTable function.

I searched all code under com_comment and I can not see existsAkoTable function anywhere. What I am doing wrong?

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 10 months ago #4853

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Look again at the path I'm giving you:
administrator/components/com_comment/toolbar.comment.html.php on line 29

administrator->components->com_comment and not
components->com_comment!!!!

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 10 months ago #4854

  • Alex
  • Alex's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 39
  • Thank you received: 0
Argh!!!!

Thank you, I must be blind...

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 9 months ago #4895

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Daniel Dimitrov wrote:

function existsAkoTable()
{
$database = JFactory::getDBO();
$database->setQuery('');
}
function existsAkoTable()
{
JFactory::getDBO()->setQuery();
}

From what I understand, the first is traditional PHP code and valid syntax.

The second I would think is a new "shorthand" way that was introduced in PHP v5 major. Technically speaking in OOP terms its horrible code - where's the variable? :P Alas it is much simpler and obviously smaller - that really counts for the most.

Regardless I think upgrading to PHPv5 is best, if not for anything else than for security and performance concerns (I don't believe PHPv4 has ZEND Optimizier capability, or even decent GZIP support?)

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 9 months ago #4900

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey JonusC,
I've explained it here:
www.compojoom.com/blog/8-news/71-system-requirements.html

Anyway why should we make a temporary variable to use memory, when we can do everything just with one line? Actually I'm not sure which one of these is more resource hungry, but anyway - php5 is since so much years out there!

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 9 months ago #4913

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
You're exactly right Daniel. The single-line is highly likely to be faster, and no we dont need a variable! That function code though is obviously a PHP v5 only thing, thus the minimum requirement for JoComment should be PHP v5. As you said - it's been out for years, and as far as I know its 100% backwards compatible with PHP v4 code (it should be) and although its just my personal opinion, I think every webhost should always use PHP5.

[Off topic] It's like Windows. Most computer repair places around here have started charging extra for fixing Windows XP computers because it's so much more vulnerable and harder to maintain than a Vista machine - from an engineers viewpoint anyway :P

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 9 months ago #5043

  • Jennifer
  • Jennifer's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I have this same error when trying to access the admin pages:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/.ita/starloft/starloft.com/main/administrator/components/com_comment/toolbar.comment.html.php on line 29


I'm not a programmer. Can you explain exactly what I need to change to make this work? Thank you.

Parse error: syntax error, unexpected T_OBJECT_OPE 14 years 9 months ago #5044

  • Jennifer
  • Jennifer's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
nevermind. I think I figured it out. Thanks!
  • Page:
  • 1
  • 2
Time to create page: 0.153 seconds