Unhandled Error!

Trying to get property of non-object

Document /modules/daracollections/classes/daracollections_lib.php
Document type PHP document
Line 235
Exception class Phpr_PhpException

Code Highlight

		if (!$id) {
	      		return false;
	  	}
 
		$object = DaraCollections_Files_Model::create()->find($id);
 
		if ($object->file) {		
			$object->no_of_downloads++;
			$object->save();	
			$customer = Cms_Controller::create()->get_customer();
			$log = DaraCollections_Files_Log_Model::create();
			$log->file_id = $object->id;
			$log->file_class_id = 1; // set as document
# Call Stack Code Document Line
20 DaraCollections_Lib::downloadFile('139') /modules/daracollections/classes/daracollections_extend.php 33
19 DaraCollections_Extend->page_before_route('/download/139')
18 call_user_func_array(array(2) [0 => object(DaraCollections_Extend), 1 => 'page_before_route'], array(1) [0 => '/download/139']) /phproad/system/class_functions.php 18
17 callFunction(array(2) [0 => object(DaraCollections_Extend), 1 => 'page_before_route'], array(1) [0 => '/download/139']) /phproad/modules/phpr/classes/phpr_events.php 77
16 Phpr_Events->fire_event(array(1) [name => 'cms:onBeforeRoute'], '/download/139')
15 call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => '/download/139']) /phproad/system/class_functions.php 18
14 callFunction(array(2) [0 => object(Phpr_Events), 1 => 'fire_event'], array(2) [0 => array(1), 1 => '/download/139']) /phproad/modules/phpr/classes/phpr_events.php 143
13 Phpr_Events->fireEvent('cms:onBeforeRoute', '/download/139')
12 call_user_func_array(array(2) [0 => object(Phpr_Events), 1 => 'fireEvent'], array(2) [0 => 'cms:onBeforeRoute', 1 => '/download/139']) /phproad/modules/phpr/classes/phpr_extensible.php 159
11 Phpr_Extensible->__call('fireEvent', array(2) [0 => 'cms:onBeforeRoute', 1 => '/download/139']) /controllers/application.php 24
10 Backend_Events->fireEvent('cms:onBeforeRoute', '/download/139') /controllers/application.php 24
9 Application->resolve_page(null) /controllers/application.php 72
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/download/139') /phproad/system/phproad.php 31
2 include('/home/hkc/www/hkcsecurity.com/public/phproad/system/phproad.php') /boot.php 114
1 require_once('/home/hkc/www/hkcsecurity.com/public/boot.php') /index.php 3