Skip to content

Commit 48903e7

Browse files
authored
Merge pull request #38 from stellarwp/fix/dependencies-must-be-arrays
Since dependencies must be arrays, ensure they are if not a callable.
2 parents 5525d26 + f748fb9 commit 48903e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: assets.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Assets
44
* Description: Asset library with a plugin bootstrap file for automated testing.
5-
* Version: 1.4.4
5+
* Version: 1.4.8
66
* Author: StellarWP
77
* Author URI: https://stellarwp.com
88
*/

Diff for: src/Assets/Asset.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ public function get_dependencies(): array {
878878
);
879879
}
880880

881-
return $dependencies;
881+
return (array) $dependencies;
882882
}
883883

884884
/**
@@ -1803,7 +1803,7 @@ public function set_dependencies( ...$dependencies ) {
18031803
if ( $dependencies[0] && is_callable( $dependencies[0] ) ) {
18041804
$this->dependencies = $dependencies[0];
18051805
} else {
1806-
$this->dependencies = $dependencies;
1806+
$this->dependencies = (array) $dependencies;
18071807
}
18081808

18091809
return $this;

0 commit comments

Comments
 (0)