I got:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/oh/public_html/modules/erp/asset/asset.module on line 1157

The PHP isn't valid. I substituted this code:

  $user_obj = user_load(array('uid' => $node->uid));

  $pdf->Write(pt(14), "Asset inserted by: " .
              $user_obj->name);

This fixed that error, and now I get this but can't figure out why:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/oh/public_html/modules/erp/asset/asset_database.inc on line 2301

Comments

singularo’s picture

Oooer. the module has become quite messed up somehow, I'll try and get a previous version that isn't broken.

tingly’s picture

Title: Parse errors in asset.module » database tables created without the erp_ prefix

I have downloaded and installed the erp module and found lot of error on the tables access. I check my drupal database using PhpMyAdmin and found all the Asset database tables were created without the erp_ prefix.

Please note!

I will try to check the asset.install to see whehter this will reslove the problem. Thank for working on the module!

:-)

singularo’s picture

The asset.install file should now both create the tables with the erp, as well as update the old tables.

tingly’s picture

I found the problem code at line # 1275 in the asset_database.inc file

$sql = "SELECT n.nid, hostname, serialnumber, user, computerid, amc.vendor as vendor, adc.name as domain, amc.model as model, amc.version
"FROM node n INNER JOIN erp_asset_computer_system acs ON n.nid = acs.nid " .
"INNER JOIN erp_asset_domain_category adc on acs.domain = adc.modelid " .
"INNER JOIN erp_asset_model_category amc ON acs.model = amc.modelid " .
"WHERE n.nid = %d";

singularo’s picture

Thats fixed in cvs. The original errors are not fixed yet though.

singularo’s picture

Status: Active » Closed (duplicate)

The table prefix changes have all been made, but the asset module problems are a duplicate of bug 72568

mjolley@buy-hot.com’s picture

Title: database tables created without the erp_ prefix » PHP errors in asset.module

Changed title, Original problem is about php errors not database errors.

mjolley@buy-hot.com’s picture

Note: there is another issue about php errors involving asset.module and php 4 which this might be a duplicate of or vice versa.

mjolley@buy-hot.com’s picture

ignore that. duplicate of bug 72568 as said before.