@@ -141,7 +141,9 @@ public function setAttached($value=true){
141
141
*/
142
142
public function afterCompile ($ index ,$ callback ){
143
143
$ index =$ this ->_getIndex ($ index );
144
- $ this ->_instanceViewer ->afterCompile ($ index , $ callback );
144
+ if ($ index !==false ){
145
+ $ this ->_instanceViewer ->afterCompile ($ index , $ callback );
146
+ }
145
147
return $ this ;
146
148
}
147
149
@@ -198,7 +200,9 @@ public function insertField($index,$field,$key=null){
198
200
199
201
public function insertInField ($ index ,$ field ,$ key =null ){
200
202
$ index =$ this ->_getIndex ($ index );
201
- $ this ->_instanceViewer ->insertInField ($ index , $ field ,$ key );
203
+ if ($ index !==false ){
204
+ $ this ->_instanceViewer ->insertInField ($ index , $ field ,$ key );
205
+ }
202
206
return $ this ;
203
207
}
204
208
@@ -210,7 +214,9 @@ public function insertInField($index,$field,$key=null){
210
214
*/
211
215
public function setValueFunction ($ index ,$ callback ){
212
216
$ index =$ this ->_getIndex ($ index );
213
- $ this ->_instanceViewer ->setValueFunction ($ index , $ callback );
217
+ if ($ index !==false ){
218
+ $ this ->_instanceViewer ->setValueFunction ($ index , $ callback );
219
+ }
214
220
return $ this ;
215
221
}
216
222
@@ -460,7 +466,9 @@ public function swapFields($index1,$index2){
460
466
461
467
public function removeField ($ index ){
462
468
$ index =$ this ->_getIndex ($ index );
463
- $ this ->_instanceViewer ->removeField ($ index );
469
+ if ($ index !==false ){
470
+ $ this ->_instanceViewer ->removeField ($ index );
471
+ }
464
472
return $ this ;
465
473
}
466
474
0 commit comments