Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

"Time" Type Field is not working

Hello Everyone,

I have created a new custom module and created a “Time” type field using the following vardefs code:
‘sunday_time_from’ => array(
‘name’ => ‘sunday_time_from’,
‘vname’ => ‘LBL_SUNDAY_TIME_FROM’,
‘type’ => ‘time’,
‘required’ => false,
‘reportable’ => false,
),
Fields are created correctly and display perfectly but when saving the data at that time display 500 Internal errors.:
** Fatal error : Uncaught Error: Cannot pass parameter 2 by reference in /var/www/html/include/MVC/Controller/SugarController.php:634 Stack trace: #0 /var/www/html/include/MVC/Controller/SugarController.php(489): SugarController->pre_save() #1 /var/www/html/include/MVC/Controller/SugarController.php(476): SugarController->pre_action() #2 /var/www/html/include/MVC/Controller/SugarController.php(451): SugarController->handle_action() #3 /var/www/html/include/MVC/Controller/SugarController.php(361): SugarController->process() #4 /var/www/html/include/MVC/SugarApplication.php(113): SugarController->execute() #5 /var/www/html/index.php(55): SugarApplication->execute() #6 {main} thrown in /var/www/html/include/MVC/Controller/SugarController.php on line 634**

SUITECRM LOG:
Thu Oct 28 08:16:09 2021 [6025][a79cd30e-dc23-1af5-997b-60c86df5c63e][FATAL] Exception handling in /var/www/html/include/MVC/Controller/SugarController.php:386
Thu Oct 28 08:16:09 2021 [6025][a79cd30e-dc23-1af5-997b-60c86df5c63e][FATAL] Exception in Controller: File ‘modules/AOD_Index/Index/Index/segments_do4’ is not readable.
Thu Oct 28 08:16:09 2021 [6025][a79cd30e-dc23-1af5-997b-60c86df5c63e][FATAL] backtrace:
#0 /var/www/html/modules/AOD_Index/Lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php(360): Zend_Search_Lucene_Storage_File_Filesystem->__construct(‘modules/AOD_Ind…’)
#1 /var/www/html/modules/AOD_Index/Lib/Zend/Search/Lucene.php(413): Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject(‘segments_do4’)
#2 /var/www/html/modules/AOD_Index/Lib/Zend/Search/Lucene.php(572): Zend_Search_Lucene->_readSegmentsFile()
#3 /var/www/html/modules/AOD_Index/AOD_Index.php(360): Zend_Search_Lucene->__construct(‘modules/AOD_Ind…’)
#4 /var/www/html/modules/AOD_Index/AOD_Index.php(81): AOD_Index->getLuceneIndex()
#5 /var/www/html/modules/Home/UnifiedSearch.php(237): AOD_Index->find(‘0544264628’)
#6 /var/www/html/modules/Home/UnifiedSearch.php(84): doSearch(Object(AOD_Index), ‘0544264628’, 0, 20)
#7 /var/www/html/include/MVC/View/SugarView.php(818): include_once(’/var/www/html/m…’)
#8 /var/www/html/include/MVC/View/views/view.classic.php(72): SugarView->includeClassicFile(‘modules/Home/Un…’)
#9 /var/www/html/include/MVC/View/SugarView.php(211): ViewClassic->display()
#10 /var/www/html/include/MVC/Controller/SugarController.php(420): SugarView->process()
#11 /var/www/html/include/MVC/Controller/SugarController.php(363): SugarController->processView()
#12 /var/www/html/include/MVC/SugarApplication.php(113): SugarController->execute()
#13 /var/www/html/index.php(55): SugarApplication->execute()
#14 {main}

The same module and fields I have created and tested on other Suite CRM Version then working fine.
But when I am added Suite 7.10.16 Version then generated the error.

Thank you @Alhimeg.
for this https://github.com/salesagility/SuiteCRM/issues/7983#issuecomment-581808406
I have removed “&” and my code is working fine.