@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // Set a list of common functions. |
| 108 | 108 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
| 109 | 109 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
| 110 | - { |
|
| 110 | + { |
|
| 111 | 111 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', (string) $string); |
| 112 | 112 | return $string; |
| 113 | 113 | } : function($string) |
@@ -2422,7 +2422,6 @@ discard block |
||
| 2422 | 2422 | loadLanguage('index+Modifications'); |
| 2423 | 2423 | $context['template_layers'] = array(); |
| 2424 | 2424 | } |
| 2425 | - |
|
| 2426 | 2425 | else |
| 2427 | 2426 | { |
| 2428 | 2427 | // Custom templates to load, or just default? |
@@ -2976,7 +2975,8 @@ discard block |
||
| 2976 | 2975 | // Take care of escaping the value for JavaScript? |
| 2977 | 2976 | if (!empty($escape)) |
| 2978 | 2977 | { |
| 2979 | - switch (gettype($value)) { |
|
| 2978 | + switch (gettype($value)) |
|
| 2979 | + { |
|
| 2980 | 2980 | // Illegal. |
| 2981 | 2981 | case 'resource': |
| 2982 | 2982 | break; |
@@ -181,8 +181,7 @@ |
||
| 181 | 181 | ) |
| 182 | 182 | // We are not previewing an attachment. |
| 183 | 183 | && !isset($_SESSION['attachments_can_preview'][$attachId]) |
| 184 | - ) |
|
| 185 | - { |
|
| 184 | + ) { |
|
| 186 | 185 | send_http_status(404, 'File Not Found'); |
| 187 | 186 | die('404 File Not Found'); |
| 188 | 187 | } |