This repository was archived by the owner on Feb 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -194,17 +194,19 @@ public function getCategoryCollection()
194194
195195 $ allExcludeIds = '' ;
196196 foreach ($ excludeCategories as $ excludeCategory ) {
197- try {
198- $ testRegex = preg_match ($ excludeCategory , '' );
199- if ($ testRegex ) {
200- $ allExcludeIds .= '- ' . $ this ->filterCategoryWithRegex ($ excludeCategory );
201- } else {
197+ if (!empty ($ excludeCategory )) {
198+ try {
199+ $ testRegex = preg_match ($ excludeCategory , '' );
200+ if ($ testRegex ) {
201+ $ allExcludeIds .= '- ' . $ this ->filterCategoryWithRegex ($ excludeCategory );
202+ } else {
203+ $ excludePath = $ this ->getExcludePath ($ excludeCategory );
204+ $ allExcludeIds .= '- ' . $ this ->filterCategoryWithPath ($ excludePath , $ categoryCollection );
205+ }
206+ } catch (Exception $ e ) {
202207 $ excludePath = $ this ->getExcludePath ($ excludeCategory );
203208 $ allExcludeIds .= '- ' . $ this ->filterCategoryWithPath ($ excludePath , $ categoryCollection );
204209 }
205- } catch (Exception $ e ) {
206- $ excludePath = $ this ->getExcludePath ($ excludeCategory );
207- $ allExcludeIds .= '- ' . $ this ->filterCategoryWithPath ($ excludePath , $ categoryCollection );
208210 }
209211 }
210212
You can’t perform that action at this time.
0 commit comments