I recieved the following error

Parse error: parse error, unexpected T_OBJECT_OPERATOR in /home/user/public_html/sites/all/modules/erp/erp_item/erp_item.module on line 362

when activating the erp item module.

any help would be greatly appreciated.

Comments

singularo’s picture

Thats probably due to some object reference code that php4 doesn't support. Can you tell me the version of PHP you're using, and paste the source code line in question into your reply?

TIA

Simon

echos’s picture

Here is the source code line:

$sell_price = array_pop(module_invoke_all('erp_tax_inc_amount', current($row)->sell_price));

I use PHP Version 4.4.4

Thank you for your reponse.

singularo’s picture

This should be fixed in the 5.x-1-1 release, basically, php4 doesn't like the current($row)->$var syntax. This has been removed.

Please note though, that we are still working with the 4-7 port primarily, although work on getting 5.x going is under way.

It may take a few hours for the tarball on the erp project page to be recreated with the patch, but its in CVS already.

echos’s picture

CVS worked, Thank you!

echos’s picture

I downloaded the CVS erp_item.module and the error went away. In the process I had uninstall all erp modules & droped the Tables. Now the install scripts do not add the tables when I try to install the modules. Any ideas would help!

singularo’s picture

This is because the system table in the database still has entries for all the erp modules. You probably need to manually delete the entries for all erp modules to get them to reinstall (as you would for any drupal module).

Be careful, you can break your whole site by changing the system table.

Using phpmyadmin is probably easiest, but if you want to do it from the mysql command line, something like "delete from system where name like 'erp%'" should work.

Remember, backup first always!

NickLitten’s picture

I've been struggling to get the ERP module installed on my website.... lots of problems getting the additional modules installed in the right sequence and this bloody 362 error seemed like the last straw... I was prepared to bin it but the CVS download has seemingly fixed it (for me anyway)

So if youre having the dreaded item_module 362 error then download the CVS fix from here:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/erp/erp_item/...

Fingers crossed for a new/fixed ERP release soon