Skip to content

Commit ccec7cc

Browse files
committed
Fix Workflow library for recent PHP and Alfred versions
1 parent e0c8af0 commit ccec7cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

workflows.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ function __construct( $bundleid=null )
3939
$this->bundle = $bundleid;
4040
endif;
4141

42-
$this->cache = $this->home. "/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/".$this->bundle;
43-
$this->data = $this->home. "/Library/Application Support/Alfred 2/Workflow Data/".$this->bundle;
42+
$this->cache = $this->home. "/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/".$this->bundle;
43+
$this->data = $this->home. "/Library/Application Support/Alfred/Workflow Data/".$this->bundle;
4444

4545
if ( !file_exists( $this->cache ) ):
4646
exec("mkdir '".$this->cache."'");
@@ -195,7 +195,7 @@ public function toxml( $a=null, $format='array' ) {
195195
$c->addAttribute( 'valid', $b[$key] );
196196
endif;
197197
elseif ( $key == 'autocomplete' ):
198-
$c->addAttribute( 'autocomplete', $b[$key] );
198+
$c->addAttribute( 'autocomplete', $b[$key] ?? '' );
199199
elseif ( $key == 'icon' ):
200200
if ( substr( $b[$key], 0, 9 ) == 'fileicon:' ):
201201
$val = substr( $b[$key], 9 );
@@ -470,4 +470,4 @@ public function result( $uid, $arg, $title, $sub, $icon, $valid='yes', $auto=nul
470470
return $temp;
471471
}
472472

473-
}
473+
}

0 commit comments

Comments
 (0)