Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

+14 -3
View File
@@ -756,6 +756,7 @@ CODE;
$inHereDoc = NULL;
$inThemeHooks = FALSE;
$inComments = FALSE;
$inUseStatement = FALSE;
$fh = fopen( $file, 'r' );
while ( $line = fgets( $fh ) )
@@ -805,10 +806,16 @@ CODE;
if ( $depth == 2 and $closeBraces )
{
$contents .= "{$tabs}}\n{$tabs}catch ( \Error | \RuntimeException \$e )\n{$tabs}{\n{$tabs}\tif( \defined( '\IPS\DEBUG_HOOKS' ) AND \IPS\DEBUG_HOOKS )\n{$tabs}\t{\n{$tabs}\t\t\IPS\Log::log( \$e, 'hook_exception' );\n{$tabs}\t}\n\n{$tabs}\tif ( method_exists( get_parent_class(), __FUNCTION__ ) )\n{$tabs}\t{\n{$tabs}\t\treturn \\call_user_func_array( 'parent::' . __FUNCTION__, \\func_get_args() );\n{$tabs}\t}\n{$tabs}\telse\n{$tabs}\t{\n{$tabs}\t\tthrow \$e;\n{$tabs}\t}\n{$tabs}}\n";
/* If we are in a USE statement, we don't want to do any wrapping */
if ( !$inUseStatement )
{
$contents .= "{$tabs}}\n{$tabs}catch ( \Error | \RuntimeException \$e )\n{$tabs}{\n{$tabs}\tif( \defined( '\IPS\DEBUG_HOOKS' ) AND \IPS\DEBUG_HOOKS )\n{$tabs}\t{\n{$tabs}\t\t\IPS\Log::log( \$e, 'hook_exception' );\n{$tabs}\t}\n\n{$tabs}\tif ( method_exists( get_parent_class(), __FUNCTION__ ) )\n{$tabs}\t{\n{$tabs}\t\treturn \\call_user_func_array( 'parent::' . __FUNCTION__, \\func_get_args() );\n{$tabs}\t}\n{$tabs}\telse\n{$tabs}\t{\n{$tabs}\t\tthrow \$e;\n{$tabs}\t}\n{$tabs}}\n";
}
$inUseStatement = FALSE;
$depth--;
}
if ( !$inHereDoc and $depth > 2 )
{
$contents .= "\t";
@@ -825,7 +832,11 @@ CODE;
if ( $depth == 2 and $openBraces )
{
$contents .= "{$tabs}try\n{$tabs}{\n";
$inUseStatement = \substr( \trim( \strtolower( $line ) ), 0, 3 ) == 'use';
if ( !$inUseStatement )
{
$contents .= "{$tabs}try\n{$tabs}{\n";
}
$depth++;
}