Skip to content

Commit

Permalink
#147 crash when $ast->children is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Aug 25, 2021
1 parent 5d00283 commit e510d9e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"require": {
"lordelph/icofileloader": "^2.0",
"tbela99/css": "dev-php56-backport-dev",
"ext-gd": "*"
"ext-gd": "*",
"mck89/peast": "^1.13"
}
}
}
8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@
"source": {
"type": "git",
"url": "https://github.com/tbela99/css.git",
"reference": "0813a2463eab243104f41c448d73898269caee05"
"reference": "a1de00dce686dca3cf73695c957cebd7cd1e14cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tbela99/css/zipball/0813a2463eab243104f41c448d73898269caee05",
"reference": "0813a2463eab243104f41c448d73898269caee05",
"url": "https://api.github.com/repos/tbela99/css/zipball/a1de00dce686dca3cf73695c957cebd7cd1e14cb",
"reference": "a1de00dce686dca3cf73695c957cebd7cd1e14cb",
"shasum": ""
},
"require": {
Expand All @@ -334,7 +334,7 @@
"ext-json": "*",
"php": ">=5.6"
},
"time": "2021-08-24T05:30:46+00:00",
"time": "2021-08-25T22:42:46+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'bd119bbc8cbae03b8de3d7fd8d0a15a4a7f92f8e',
'reference' => '5d00283a0be6534d6b5d6fff42c897277b96a9a4',
'name' => '__root__',
'dev' => true,
),
Expand All @@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'bd119bbc8cbae03b8de3d7fd8d0a15a4a7f92f8e',
'reference' => '5d00283a0be6534d6b5d6fff42c897277b96a9a4',
'dev_requirement' => false,
),
'axy/backtrace' => array(
Expand Down Expand Up @@ -79,7 +79,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../tbela99/css',
'aliases' => array(),
'reference' => '0813a2463eab243104f41c448d73898269caee05',
'reference' => 'a1de00dce686dca3cf73695c957cebd7cd1e14cb',
'dev_requirement' => false,
),
),
Expand Down
5 changes: 5 additions & 0 deletions vendor/tbela99/css/src/TBela/CSS/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public function __construct($ast = null, $parent = null) {

foreach ($ast as $key => $value) {

if (is_null($value)) {

continue;
}

if (is_callable([$this, 'set'.$key])) {

$this->{'set'.$key}($value);
Expand Down

0 comments on commit e510d9e

Please sign in to comment.