Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 5, 20186 yr Hi, On exporting a plugin I experience that it exports it with a double try/catch-block <?php public function commentFormElements() { try { try { // My code } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); } else { throw $e; } } } How to avoid this? Okay, totally my bad. For some reason the try/catch-code is actually in the dev code. I don't remember putting it there though. I guess I can just remove it from the dev code for the plugin, right?
September 5, 20186 yr Yes, you can manually remove it from your plugin dev file. It is added on export, so if you exported at one point and then copied the exported file to your dev environment, that's how this would occur.
Archived
This topic is now archived and is closed to further replies.