@@ -57,7 +57,7 @@ public static function ajax_handler_body() {
5757
5858 if ( false === $ transient ) {
5959 http_response_code ( 404 );
60- die ;
60+ exit () ;
6161 }
6262
6363 header ( 'Accept-Ranges: bytes ' );
@@ -87,7 +87,7 @@ public static function ajax_handler_body() {
8787
8888 if ( is_null ( $ stream ) ) {
8989 http_response_code ( 500 );
90- die ;
90+ exit () ;
9191 }
9292
9393 ob_end_clean ();
@@ -116,7 +116,7 @@ private static function resolve_range( $size ) {
116116
117117 if ( 2 !== count ( $ limits ) ) {
118118 http_response_code ( 416 );
119- die ;
119+ exit () ;
120120 }
121121
122122 $ raw_start = $ limits [0 ];
@@ -134,7 +134,7 @@ private static function resolve_range( $size ) {
134134
135135 if ( $ start > $ end ) {
136136 http_response_code ( 416 );
137- die ;
137+ exit () ;
138138 }
139139
140140 return array ( $ start , $ end );
@@ -152,15 +152,15 @@ private static function resolve_range( $size ) {
152152 private static function check_range_header ( $ header ) {
153153 if ( ! str_starts_with ( $ header , 'bytes= ' ) ) {
154154 http_response_code ( 416 );
155- die ;
155+ exit () ;
156156 }
157157
158158 $ header = substr ( $ header , 6 );
159159
160160 // Multipart range requests are not supported.
161161 if ( str_contains ( $ header , ', ' ) ) {
162162 http_response_code ( 416 );
163- die ;
163+ exit () ;
164164 }
165165
166166 return $ header ;
0 commit comments