New Virtuemart installation, in administrator and front end we are getting the following error:
Parse error: syntax error, unexpected 'and' (T_LOGICAL_AND), expecting ')' in /home2/xxxxxxxx/public_html/administrator/components/com_virtuemart/models/user.php on line 934
Line 934 reads:
( (empty($data['virtuemart_vendor_id'] and empty($data['user_is_vendor']))) or
Any ideas please?
shouldn't it be
if(!empty($data['virtuemart_vendor_user_id']) and is_array($data['virtuemart_vendor_user_id']) or ($data['virtuemart_vendor_user_id']>1) and
( (empty($data['virtuemart_vendor_id']) and empty($data['user_is_vendor'])) or
(!empty($data['virtuemart_vendor_id']) and $data['virtuemart_vendor_id']!=$data['virtuemart_vendor_user_id']) ) ){
?
closing ) on the first empty and removed from the end of the statement?
Hi GJC
Thank you so much, no idea how it was not corrupt but working now :)
Thanks Again!
Really strange, I wonder that I got no error, which php versoin do you use?
could u explain what function you were trying when u saw the error?
The syntax was wrong but we are having trouble recreating the error..
I got the same error, and GJC gives the solution.
I can reproduce the error with the following steps:
- New VM with Centos7, minimal install, update, install LAMP
- Copy (with php kickstart *.jpa) an webshop with joomla 3.4.8 and virtuemart 3.0.12
- Update joomla to 3.6.5, update virtuemart (version I cannot access at this time, but later I can)
Now virtuemart/administrator gives the error as mentioned by TS. And the solution of GJC solves it.
Good day! I just updated VM from 3.4 to 3.6 and got same error on attempt to open http://****/administrator/index.php?option=com_virtuemart
PHP Parse error: syntax error, unexpected 'and' (T_LOGICAL_AND), expecting ')' in ******/administrator/components/com_virtuemart/models/user.php on line 934
Corrected parentheses as GJC Web Design advised. VM Control Panel became avaliable but if I tried enter to Orders server returned HTTP 500 again with
PHP Parse error: syntax error, unexpected 'and' (T_LOGICAL_AND), expecting ')' in ***/administrator/components/com_virtuemart/models/orders.php on line 607,
I corrected Line 607 same way and it works
if(!empty($itemTaxes['VatTax']) and count($itemTaxes['VatTax'])==1){
Maybe it helps you.
vm3.6x is not enough, please tell use the subversion. The whole thing should be fixed in vm3.6.10
Quote from: Milbo on February 06, 2020, 20:57:14 PM
vm3.6x is not enough, please tell use the subversion. The whole thing should be fixed in vm3.6.10
Version is VirtueMart 3.6.10 10211
And there is one more issue with this update described here https://forum.virtuemart.net/index.php?topic=144213.0
Maybe you interesting in check it. ;)