Jump to content
DevFuse Forums
  • Triplicate try/catch code in the hook


    terabyte
    • Fixed IP.Board Version: IP.Board 4.3.x

    The try/catch wrapper in the hook file "\autowelcome\hooks\validatehook.php" is there 3 times in both functions, 2 of them should be removed:

    				}
    				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;
    				}
    			}
    		}
    		catch ( \RuntimeException $e )
    		{
    			if ( method_exists( get_parent_class(), __FUNCTION__ ) )
    			{
    				return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() );
    			}
    			else
    			{
    				throw $e;
    			}
    		}

    User Feedback

    Recommended Comments



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

    Pending = We are still working on this report.

    Fixed = The issue has been fixed and the resolution will be available in the next version.

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

×
×
  • Create New...