mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 11:04:08 +01:00
Do not apply options which value is null
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Do not add options which value is `NULL`
|
||||||
|
|
||||||
## [3.1.5] - 2019-08-26
|
## [3.1.5] - 2019-08-26
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -130,7 +136,9 @@ Implemented enhancements
|
|||||||
- Bypass filesystem cache in debug mode
|
- Bypass filesystem cache in debug mode
|
||||||
- Changelog added
|
- Changelog added
|
||||||
|
|
||||||
[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.4
|
[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...hotfix/3.1.6
|
||||||
|
[3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5
|
||||||
|
[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.3...3.1.4
|
||||||
[3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3
|
[3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3
|
||||||
[3.1.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1
|
[3.1.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1
|
||||||
[3.0.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4
|
[3.0.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4
|
||||||
|
|||||||
@@ -210,6 +210,10 @@ class OptionsBuilder
|
|||||||
foreach ($options as $option => $mapping) {
|
foreach ($options as $option => $mapping) {
|
||||||
$default = static::getDefaultOption($option, $definition);
|
$default = static::getDefaultOption($option, $definition);
|
||||||
|
|
||||||
|
if ($model->$mapping === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($model->$mapping === '1' || $model->$mapping === '') {
|
if ($model->$mapping === '1' || $model->$mapping === '') {
|
||||||
if (((bool) $model->$mapping) !== $default) {
|
if (((bool) $model->$mapping) !== $default) {
|
||||||
static::applyOption($option, $model->$mapping, $definition);
|
static::applyOption($option, $model->$mapping, $definition);
|
||||||
|
|||||||
Reference in New Issue
Block a user