Closed ItsReddi closed 10 years ago
Not sure why... hope your PHP version is correct.. :-).
Anyway, a small change -- you may try changing the echo
to return
in your Closure
(not that should matter much though):
'afterInput' => function ($form, $widget) use ($model, $index) {
return $form->field($model, "[{$index}]color")->widget(\kartik\widgets\ColorInput::classname(), [
...
PHP 5.5.11
doesnt matter return or echo. smae error even with
function () {
echo "test"; // or return "test";
}
I am not able to reproduce this. If you can debug and let know it would be helpful.
hmm just for knowledge... where do you execute the anonymous function? or is it some yii magic? i can only find the. (there is no executing?)
if ($this->afterInput !== null) {
echo $this->afterInput;
}
if i change the code to: (executing the anonymous function it works)
if ($this->afterInput !== null) {
$tmp = $this->afterInput;
echo $tmp();
}
there is no callUserFunc or anything else.
The validation is done in the Editable extension as seen here. I hope you have the updated code for yii2-editable.
hmm strange. ok i dont have the right version!
but im updating every day with following composer settings
"minimum-stability": "dev",
"require": { "php": ">=5.4.0", "yiisoft/yii2": "2.0.*", "yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-swiftmailer": "*", "schmunk42/yii2-giiant":"*", "reddi/yii2-ar-softdelete-behavior":"1.0.*", "kartik-v/yii2-widgets":"*", "kartik-v/yii2-grid":"*", "kartik-v/yii2-detail-view": "*", "bariew/yii2-rbac-cms-module": "*", "kartik-v/yii2-builder": "*", "kartik-v/yii2-slider": "*", "kartik-v/yii2-popover-x": "*", .... },
Follow this webtip when composer is behaving funny and not updating.
found it... i set the prefer-stable to true.. i thought you dont have any stable releases at the moment ^^ thanks...
hi i copied your configuration on demo site for the first field:
i got an error it seems that the closure isnt executed?:
im using the latest widgets / grids an so on.