Skip to content

Commit

Permalink
Bugfix 2.0.4, revert typecasting
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmacwhite committed Jun 23, 2022
1 parent 468b91d commit c7a8751
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.0.4 - 2022-06-23
### Fixed
- Revert typecasting on serializeValue function

## 2.0.3 - 2022-06-02
### Fixed
- Added migration to remove settings key from the tablemaker plugin config key if present. From a Craft 2 site there was a settings key in the plugins table.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "supercool/tablemaker",
"description": "A user-definable table field type for Craft CMS",
"type": "craft-plugin",
"version": "2.0.3",
"version": "2.0.4",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 2 additions & 2 deletions src/fields/TableMakerField.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function normalizeValue($value, ElementInterface $element = null)
* @param ElementInterface|null $element The element query
* @return null|false `false` in the event that the method is sure that no elements are going to be found.
*/
public function serializeValue($value, ElementInterface $element = null): ?bool
public function serializeValue($value, ElementInterface $element = null)
{
if (!empty($value['rows']) && is_array($value['rows'])) {
// drop keys from the rows array
Expand Down Expand Up @@ -256,7 +256,7 @@ public function getInputHtml($value, ElementInterface $element = null): string

// make input
$input = '<input class="table-maker-field" type="hidden" name="'.$name.'" value="">';

// get columns from db or fall back to default
if (!empty($value['columns'])) {
foreach ($value['columns'] as $key => $val) {
Expand Down

0 comments on commit c7a8751

Please sign in to comment.