VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: osp on February 22, 2012, 18:42:17 PM

Title: 2.0.1.N error T_PAAMAYIM_NEKUDOTAYIM error (SOLVED)
Post by: osp on February 22, 2012, 18:42:17 PM
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in C:\apm\www\elshp\administrator\components\com_virtuemart\models\user.php on line 129


Uuhaa...
Windows, Apache,  J1.7, VM2.0.1.N, PHP5.2

So for all of those who installed 2.0.1.N and see this error and wants to use it (as me because Max implemented conditional redirector / thankx), momental bug fix is to edit administrator/models/user.php

change line 129
      $userId = $vendorModel::getUserIdByVendorId($vendorId);
to

      $userId = $vendorModel->getUserIdByVendorId($vendorId);

Well, static members cannot be accesed on instances  :) Okay, this happens.
I just wonder noone saw this error during testing, it smashes VM down on first touch on category listing...

Cheers...



Title: Re: 2.0.1.N error T_PAAMAYIM_NEKUDOTAYIM error (SOLVED)
Post by: Milbo on February 22, 2012, 18:55:29 PM
Thank you spilka, I posted already a slightly better method in another thread, but yours will be easier to find.

The last trouble is the line 129, please use this line

$userId = VirtueMartModelVendor::getUserIdByVendorId($vendorId);

When you have this error, treat your admin hard to get php5.3
Title: Re: 2.0.1.N error T_PAAMAYIM_NEKUDOTAYIM error (SOLVED)
Post by: Fintan on February 24, 2012, 10:31:34 AM
Thanks guys. This worked:
$userId = $vendorModel->getUserIdByVendorId($vendorId);

Cheers :)