File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Server/Components/AOP Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function __call($name, $arguments)
3838 $ aspect ['instance ' ] = Pool::getInstance ()->get ($ aspect ['aspect_class ' ]);
3939 $ aspect ['instance ' ]->init ($ this ->own , $ this ->class_name ,$ name , $ arguments );
4040 $ instance = $ aspect ['instance ' ];
41- $ before = $ aspect ['before_method ' ];
41+ $ before = $ aspect ['before_method ' ]?? null ;
4242 if (!empty ($ before )) {
4343 $ instance ->$ before ();
4444 }
@@ -50,7 +50,7 @@ public function __call($name, $arguments)
5050 $ isThrow = true ;
5151 foreach ($ aspects as $ aspect ){
5252 $ instance = $ aspect ['instance ' ];
53- $ throw = $ aspect ['throw_method ' ];
53+ $ throw = $ aspect ['throw_method ' ]?? null ;
5454 if (!empty ($ throw )) {
5555 $ instance ->$ throw ($ e );
5656 }
@@ -59,7 +59,7 @@ public function __call($name, $arguments)
5959 }finally {
6060 foreach ($ aspects as $ aspect ){
6161 $ instance = $ aspect ['instance ' ];
62- $ after = $ aspect ['after_method ' ];
62+ $ after = $ aspect ['after_method ' ]?? null ;
6363 if (!empty ($ after )) {
6464 $ instance ->$ after ($ isThrow );
6565 }
You can’t perform that action at this time.
0 commit comments