Hello, all.
I have some one logic hook, that work good on local machine, but don’t work on server.
Both debian 8, LAMP. Local some firing field, Server for work.
PHP file is two part, first part work only in local, second work on both.
I check all var iv vardefs.php on both machines, its identical.
Help me plz to fix this bug.
Hoock file:
<?php $hook_version = 1; $hook_array = Array(); $hook_array['before_save'] = Array(); $hook_array['before_save'][] = Array( 2, 'lastprice', 'custom/Extension/modules/custom_Buy_Sale/lastprice.php', 'lastprice', 'getoldprice' ); /lastprice.php: <?php if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class lastprice { function getoldprice ($bean, $event, $arguments) { //first part $price=$bean->price; $name=$bean->name; $buysaleBean = BeanFactory::getBean('custom_Buy_Sale'); $buysaleBean -> retrieve_by_string_fields( array( 'name' => $name )); if ($price != ($buysaleBean->price)) { $bean->last_price = ($buysaleBean->price); } //second part $tot_ar=$bean->total_area; $bean->cost_per_unit=$price/$tot_ar; } } Thanks.