File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ public function bindings($type=null) {
4949 }
5050 }
5151 if ($ type ) {
52- return $ this ->bindings [$ type ];
52+ if (isset ($ this ->bindings [$ type ])) {
53+ return $ this ->bindings [$ type ];
54+ } else {
55+ return false ;
56+ }
5357 }
5458 return $ this ->bindings ;
5559 }
Original file line number Diff line number Diff line change @@ -1093,6 +1093,9 @@ public function redis($args, $assoc_args) {
10931093 switch ($ action ) {
10941094 case 'clear ' :
10951095 $ bindings = $ site ->bindings ('cacheserver ' );
1096+ if (empty ($ bindings )) {
1097+ \Terminus::error ("Redis cache not enabled " );
1098+ }
10961099 $ commands = array ();
10971100 foreach ($ bindings as $ binding ) {
10981101 if ( @$ env AND $ env != $ binding ->environment ) continue ;
You can’t perform that action at this time.
0 commit comments