Skip to content

Commit

Permalink
Merge pull request #162 from PrestaSafe/3.0.2
Browse files Browse the repository at this point in the history
3.0.2
  • Loading branch information
PrestaSafe authored Nov 13, 2023
2 parents fd3bd28 + 95953a8 commit 04d57d3
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 445 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ views/images/*
**.DS_Store**
test.php
.php-cs-fixer.cache
_dev/yarn.lock
_dev/yarn.lock
3 changes: 2 additions & 1 deletion _dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "vite --port 3002",
"build": "vite build",
"watch": "vite build --watch",
"preview": "vite preview"
"preview": "vite preview",
"watch-iframe": "vite build --watch --config vite.config.prettyblocks.js"
},
"dependencies": {
"@headlessui/vue": "^1.7.16",
Expand Down
8 changes: 4 additions & 4 deletions classes/PrettyBlocksModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ public function saveConfigField($name, $new_value)
if (isset($this->configFields[$name])) {
$newField = $this->configFields[$name]->setAttribute('new_value', $new_value)->compile();
$jsonConfig = json_decode($this->config, true);
if (!is_null($jsonConfig)) {
$json = [];
if (is_null($jsonConfig)) {
$jsonConfig = [];
}
$json[$name] = $newField;
$this->config = json_encode($json, true);
$jsonConfig[$name] = $newField;
$this->config = json_encode($jsonConfig, true);

return $this->save();
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"php-cs-fixer fix --no-interaction --dry-run --diff"
],
"fix": [
"php-cs-fixer fix --diff"
"php-cs-fixer fix"
],
"autoindex": [
"vendor/bin/autoindex prestashop:add:index ./"
Expand Down
Loading

0 comments on commit 04d57d3

Please sign in to comment.