Skip to content

Commit 8324c9a

Browse files
authored
Merge pull request #3 from mehdiRma10/master
corrected explode on ,
2 parents 1625120 + 1fbe4da commit 8324c9a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/CssEditor/CSS/CSSList/CSSList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function removeDeclarationBlockBySelector($mSelector, $bRemoveAll = false
6969
$mSelector = $mSelector->getSelectors();
7070
}
7171
if (!is_array($mSelector)) {
72-
$mSelector = explode(',', $mSelector);
72+
$mSelector = [$mSelector];
7373
}
7474
foreach ($mSelector as $iKey => &$mSel) {
7575
if (!($mSel instanceof Selector)) {

src/CssEditor/CSS/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function setSelectors($mSelector) {
2828

2929
if (is_array($mSelector)) {
3030
$this->aSelectors = $mSelector;
31+
} else {
32+
$this->aSelectors = [$mSelector];
3133
}
3234

3335
foreach ($this->aSelectors as $iKey => $mSelector) {

0 commit comments

Comments
 (0)