Skip to content

Commit 054d8cd

Browse files
authored
Merge pull request #303 from schmunk42/marc7000-marc7000-patch-1
Marc7000 marc7000 patch 1
2 parents c24c2c0 + 93ae702 commit 054d8cd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/generators/crud/callbacks/yii/Html.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static function column()
1313
'format' => 'html',
1414
'attribute' => '{$attribute}',
1515
'value'=> function(\$model){
16-
return html_entity_decode(\$model->{$attribute});
16+
return is_string(\$model->{$attribute}) ? html_entity_decode(\$model->{$attribute}) : \$model->{$attribute};
1717
}
1818
]
1919
FORMAT;
@@ -28,7 +28,9 @@ public static function attribute()
2828
[
2929
'format' => 'html',
3030
'attribute' => '{$attribute}',
31-
'value' => html_entity_decode(\$model->{$attribute})
31+
'value'=> function(\$model){
32+
return is_string(\$model->{$attribute}) ? html_entity_decode(\$model->{$attribute}) : \$model->{$attribute};
33+
}
3234
]
3335
FORMAT;
3436
};

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: open bash test
22

3-
DOCKER_COMPOSE ?= docker-compose
3+
DOCKER_COMPOSE ?= docker compose
44

55
PHP ?= phpfpm
66
WEB ?= phpfpm

0 commit comments

Comments
 (0)