Commit e1410da 1 parent d026a84 commit e1410da Copy full SHA for e1410da
File tree 1 file changed +2
-2
lines changed
CRM/Civioffice/DocumentRendererType
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -601,7 +601,7 @@ protected function lock()
601
601
$ lock_file_path = $ this ->unoconv_lock_file_path ;
602
602
if ($ lock_file_path ) {
603
603
$ this ->unoconv_lock_file = fopen ($ lock_file_path , "w+ " );
604
- if (!flock ($ this ->unoconv_lock_file , LOCK_EX )) {
604
+ if (!$ this -> unoconv_lock_file || ! flock ($ this ->unoconv_lock_file , LOCK_EX )) {
605
605
throw new Exception (E::ts ("CiviOffice: Could not acquire unoconv lock. " ));
606
606
}
607
607
}
@@ -613,7 +613,7 @@ protected function lock()
613
613
protected function unlock ()
614
614
{
615
615
if ($ this ->unoconv_lock_file ) {
616
- if (!flock ($ this ->unoconv_lock_file , LOCK_UN )) {
616
+ if (!$ this -> unoconv_lock_file || ! flock ($ this ->unoconv_lock_file , LOCK_UN )) {
617
617
Civi::log ()->debug ("CiviOffice: Could not release unoconv lock. " );
618
618
}
619
619
fclose ($ this ->unoconv_lock_file );
You can’t perform that action at this time.
0 commit comments