Something went wrong while setting issue due date.
SUPANN_DIR not correctly generated
Closed
SUPANN_DIR not correctly generated
Description
The SUPANN_DIR is not correctly generated
Distribution Name and Version
Installation from the sources on rockylinux 8 (but should apply for any distribution)
FusionDirectory Version
1.4-dev
PHP version used
7.4
Origin of php packages
Installation with FusionIAM project
Steps to Reproduce
When installing Fusion Directory + supann plugin, we get some errors in the logs:
Jan 10 17:32:43 c8d7ef030efb php: FusionDirectory [fusioniam-admin]: (error) /usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc of type php : Type:2, Message:Use of undefined constant SUPANN_DIR - assumed 'SUPANN_DIR' (this will throw an Error in a future version of PHP), File:/usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc, Line: 49
Jan 10 17:32:43 c8d7ef030efb php: FusionDirectory [fusioniam-admin]: (error) /usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc of type php : Type:2, Message:Use of undefined constant SUPANN_DIR - assumed 'SUPANN_DIR' (this will throw an Error in a future version of PHP), File:/usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc, Line: 49
Jan 10 17:32:43 c8d7ef030efb php: FusionDirectory [fusioniam-admin]: (error) /usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc of type php : Type:2, Message:readdir() expects parameter 1 to be resource, bool given, File:/usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc, Line: 31
Jan 10 17:32:43 c8d7ef030efb php: FusionDirectory [fusioniam-admin]: (error) /usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc of type php : Type:2, Message:closedir() expects parameter 1 to be resource, bool given, File:/usr/local/share/fusiondirectory/plugins/admin/supannStructures/class_supann.inc, Line: 37
Expected behavior:
no error should appear
Actual behavior:
errors displayed above.
I suppose the supann structures are not working correctly either.
Reproduces how often:
100%
Additional Information
The problem is due to a missing "end of comment" in contrib/bin/fusiondirectory-setup
, line 623:
/* Directory containing the supann files
define ("SUPANN_DIR", "$vars{fd_config_dir}/supann/"); /* FusionDirectory supann template directory */
Should be fixed with:
/* Directory containing the supann files */
define ("SUPANN_DIR", "$vars{fd_config_dir}/supann/"); /* FusionDirectory supann template directory */