Completed
Push — branch-4.1 ( de5c52...429990 )
by Jeremy
46:10 queued 36:01
created

class.jetpack-debugger.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
class Jetpack_Debugger {
4
5
	private static function is_jetpack_support_open() {
6
		try {
7
			$url = add_query_arg( 'ver', JETPACK__VERSION, 'https://jetpack.com/is-support-open/' );
8
			$response = wp_remote_request( esc_url_raw( $url ) );
9
			if ( is_wp_error( $response ) ) {
10
				return false;
11
			}
12
			$body = wp_remote_retrieve_body( $response );
13
			$json = json_decode( $body );
14
			return ( ( bool ) $json->is_support_open );
15
		}
16
		catch ( Exception $e ) {
17
			return true;
18
		}
19
	}
20
21
	public static function jetpack_increase_timeout() {
22
		return 30; // seconds
23
	}
24
25
	public static function jetpack_debug_display_handler() {
26
		if ( ! current_user_can( 'manage_options' ) )
27
			wp_die( esc_html__('You do not have sufficient permissions to access this page.', 'jetpack' ) );
28
29
		$current_user = wp_get_current_user();
30
31
		$user_id = get_current_user_id();
32
		$user_tokens = Jetpack_Options::get_option( 'user_tokens' );
33
		if ( is_array( $user_tokens ) && array_key_exists( $user_id, $user_tokens ) ) {
34
			$user_token = $user_tokens[$user_id];
35
		} else {
36
			$user_token = '[this user has no token]';
37
		}
38
		unset( $user_tokens );
39
40
		$debug_info = "\r\n";
41
		foreach ( array(
42
			'CLIENT_ID'   => 'id',
43
			'BLOG_TOKEN'  => 'blog_token',
44
			'MASTER_USER' => 'master_user',
45
			'CERT'        => 'fallback_no_verify_ssl_certs',
46
			'TIME_DIFF'   => 'time_diff',
47
			'VERSION'     => 'version',
48
			'OLD_VERSION' => 'old_version',
49
			'PUBLIC'      => 'public',
50
		) as $label => $option_name ) {
51
			$debug_info .= "\r\n" . esc_html( $label . ": " . Jetpack_Options::get_option( $option_name ) );
52
		}
53
54
		$debug_info .= "\r\n" . esc_html( "USER_ID: " . $user_id );
55
		$debug_info .= "\r\n" . esc_html( "USER_TOKEN: " . $user_token );
56
		$debug_info .= "\r\n" . esc_html( "PHP_VERSION: " . PHP_VERSION );
57
		$debug_info .= "\r\n" . esc_html( "WORDPRESS_VERSION: " . $GLOBALS['wp_version'] );
58
		$debug_info .= "\r\n" . esc_html( "JETPACK__VERSION: " . JETPACK__VERSION );
59
		$debug_info .= "\r\n" . esc_html( "JETPACK__PLUGIN_DIR: " . JETPACK__PLUGIN_DIR );
60
		$debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() );
61
		$debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() );
62
63
		foreach ( array (
64
					  'HTTP_HOST',
65
					  'SERVER_PORT',
66
					  'HTTPS',
67
					  'GD_PHP_HANDLER',
68
					  'HTTP_AKAMAI_ORIGIN_HOP',
69
					  'HTTP_CF_CONNECTING_IP',
70
					  'HTTP_CLIENT_IP',
71
					  'HTTP_FASTLY_CLIENT_IP',
72
					  'HTTP_FORWARDED',
73
					  'HTTP_FORWARDED_FOR',
74
					  'HTTP_INCAP_CLIENT_IP',
75
					  'HTTP_TRUE_CLIENT_IP',
76
					  'HTTP_X_CLIENTIP',
77
					  'HTTP_X_CLUSTER_CLIENT_IP',
78
					  'HTTP_X_FORWARDED',
79
					  'HTTP_X_FORWARDED_FOR',
80
					  'HTTP_X_IP_TRAIL',
81
					  'HTTP_X_REAL_IP',
82
					  'HTTP_X_VARNISH',
83
					  'REMOTE_ADDR'
84
				  ) as $header ) {
85
			if ( isset( $_SERVER[ $header ] ) ) {
86
				$debug_info .= "\r\n" . esc_html( $header . ": " . $_SERVER[ $header ] );
87
			}
88
		}
89
90
		$debug_info .= "\r\n" . esc_html( "PROTECT_TRUSTED_HEADER: " . json_encode( get_site_option( 'trusted_ip_header' ) ) );
91
92
		$debug_info .= "\r\n\r\nTEST RESULTS:\r\n\r\n";
93
		$debug_raw_info = '';
94
95
96
		$tests = array();
97
98
		$tests['HTTP']['result'] = wp_remote_get( preg_replace( '/^https:/', 'http:', JETPACK__API_BASE ) . 'test/1/' );
99
		$tests['HTTP']['fail_message'] = esc_html__( 'Your site isn’t reaching the Jetpack servers.', 'jetpack' );
100
101
		$tests['HTTPS']['result'] = wp_remote_get( preg_replace( '/^http:/', 'https:', JETPACK__API_BASE ) . 'test/1/' );
102
		$tests['HTTPS']['fail_message'] = esc_html__( 'Your site isn’t securely reaching the Jetpack servers.', 'jetpack' );
103
104
		$identity_crisis_message = '';
105
		if ( $identity_crisis = Jetpack::check_identity_crisis( true ) ) {
106
			foreach( $identity_crisis as $key => $value ) {
107
				$identity_crisis_message .= sprintf( __( 'Your `%1$s` option is set up as `%2$s`, but your WordPress.com connection lists it as `%3$s`!', 'jetpack' ), $key, (string) get_option( $key ), $value ) . "\r\n";
108
			}
109
			$identity_crisis = new WP_Error( 'identity-crisis', $identity_crisis_message, $identity_crisis );
110
		} else {
111
			$identity_crisis = 'PASS';
112
		}
113
		$tests['IDENTITY_CRISIS']['result'] = $identity_crisis;
114
		$tests['IDENTITY_CRISIS']['fail_message'] = esc_html__( 'Something has gotten mixed up in your Jetpack Connection!', 'jetpack' );
115
116
		$self_xml_rpc_url = home_url( 'xmlrpc.php' );
117
118
		$testsite_url = Jetpack::fix_url_for_bad_hosts( JETPACK__API_BASE . 'testsite/1/?url=' );
119
120
		add_filter( 'http_request_timeout', array( 'Jetpack_Debugger', 'jetpack_increase_timeout' ) );
121
122
		$tests['SELF']['result'] = wp_remote_get( $testsite_url . $self_xml_rpc_url );
123
		if ( is_wp_error( $tests['SELF']['result'] ) && 0 == strpos( $tests['SELF']['result']->get_error_message(), 'Operation timed out' ) ){
124
			$tests['SELF']['fail_message'] = esc_html__( 'Your site did not get a response from our debugging service in the expected timeframe. If you are not experiencing other issues, this could be due to a slow connection between your site and our server.', 'jetpack' );
125
		} else {
126
			$tests['SELF']['fail_message'] = esc_html__( 'It looks like your site can not communicate properly with Jetpack.', 'jetpack' );
127
		}
128
129
		remove_filter( 'http_request_timeout', array( 'Jetpack_Debugger', 'jetpack_increase_timeout' ) );
130
131
		?>
132
		<div class="wrap">
133
			<h2><?php esc_html_e( 'Jetpack Debugging Center', 'jetpack' ); ?></h2>
134
			<h3><?php _e( "Testing your site's compatibility with Jetpack...", 'jetpack' ); ?></h3>
135
			<div class="jetpack-debug-test-container">
136
			<?php
137
			ob_start();
138
			foreach ( $tests as $test_name => $test_info ) :
139
				if ( 'PASS' !== $test_info['result'] && ( is_wp_error( $test_info['result'] ) ||
140
					false == ( $response_code = wp_remote_retrieve_response_code( $test_info['result'] ) )  ||
141
					'200' != $response_code ) ) {
0 ignored issues
show
The variable $response_code does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
142
					$debug_info .= $test_name . ": FAIL\r\n";
143
					?>
144
					<div class="jetpack-test-error">
145
						<p>
146
							<a class="jetpack-test-heading" href="#"><?php echo $test_info['fail_message']; ?>
147
							<span class="noticon noticon-collapse"></span>
148
							</a>
149
						</p>
150
						<pre class="jetpack-test-details"><?php echo esc_html( $test_name ); ?>:
151
	<?php echo esc_html( is_wp_error( $test_info['result'] ) ? $test_info['result']->get_error_message() : print_r( $test_info['result'], 1 ) ); ?></pre>
152
					</div><?php
153
				} else {
154
					$debug_info .= $test_name . ": PASS\r\n";
155
				}
156
				$debug_raw_info .= "\r\n\r\n" . $test_name . "\r\n" . esc_html( is_wp_error( $test_info['result'] ) ? $test_info['result']->get_error_message() : print_r( $test_info['result'], 1 ) );
157
				?>
158
			<?php endforeach;
159
			$html = ob_get_clean();
160
161
			if ( '' == trim( $html ) ) {
162
				echo '<div class="jetpack-tests-succed">' . esc_html__( 'Your Jetpack setup looks a-okay!', 'jetpack' ) . '</div>';
163
			}
164
			else {
165
				echo '<h3>' . esc_html__( 'There seems to be a problem with your site’s ability to communicate with Jetpack!', 'jetpack' ) . '</h3>';
166
				echo $html;
167
			}
168
			$debug_info .= "\r\n\r\nRAW TEST RESULTS:" . $debug_raw_info ."\r\n";
169
			?>
170
			</div>
171
			<div class="entry-content">
172
				<h3><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h3>
173
				<h4><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></h4>
174
				<ol>
175
					<li><b><em><?php esc_html_e( 'A known issue.', 'jetpack' ); ?></em></b>  <?php echo sprintf( __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s" target="_blank">Jetpack support pages</a> or <a href="%4$s" target="_blank">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/', 'http://wordpress.org/support/plugin/jetpack' ); ?></li>
176
					<li><b><em><?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?></em></b>  <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?></li>
177
					<li>
178
						<b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b>
179
						<?php
180
							$default_theme = wp_get_theme( WP_DEFAULT_THEME );
181
182
							if ( $default_theme->exists() ) {
183
								echo esc_html( sprintf( __( "If your problem isn't known or caused by a plugin, try activating %s (the default WordPress theme).", 'jetpack' ), $default_theme->get( 'Name' ) ) );
184
							} else {
185
								esc_html_e( "If your problem isn't known or caused by a plugin, try activating the default WordPress theme.", 'jetpack' );
186
							}
187
						?>
188
						<?php esc_html_e( "If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?>
189
					</li>
190
					<li><b><em><?php esc_html_e( 'A problem with your XMLRPC file.', 'jetpack' ); ?></em></b>  <?php echo sprintf( __( 'Load your <a href="%s">XMLRPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), site_url( 'xmlrpc.php' ) ); ?>
191
						<ul>
192
							<li>- <?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li>
193
							<li>- <?php esc_html_e( "If you get a 404 message, contact your web host. Their security may block XMLRPC.", 'jetpack' ); ?></li>
194
						</ul>
195
					</li>
196
				</ol>
197
				<?php if ( self::is_jetpack_support_open() ): ?>
198
				<p class="jetpack-show-contact-form"><?php echo sprintf( __( 'If none of these help you find a solution, <a href="%s">click here to contact Jetpack support</a>. Tell us as much as you can about the issue and what steps you\'ve tried to resolve it, and one of our Happiness Engineers will be in touch to help.', 'jetpack' ), Jetpack::admin_url( array( 'page' => 'jetpack-debugger', 'contact' => true ) ) ); ?>
199
				</p>
200
				<?php endif; ?>
201
				<?php if ( Jetpack::is_active() ) : ?>
202
					<hr />
203
					<div id="connected-user-details">
204
						<p><?php printf( __( 'The primary connection is owned by <strong>%s</strong>\'s WordPress.com account.', 'jetpack' ), esc_html( Jetpack::get_master_user_email() ) ); ?></p>
205
					</div>
206
					<hr />
207
					<div id="sync-related-posts">
208
						<p><?php echo esc_html__( 'Some features of Jetpack use the WordPress.com infrastructure and require that your public content be mirrored there. If you see intermittent issues only affecting certain posts, please try requesting a reindex of your posts.', 'jetpack' ); ?></p>
209
						<?php echo Jetpack::init()->sync->reindex_ui() ?>
210
					</div>
211
				<?php endif; ?>
212
			</div>
213
			<div id="contact-message" <?php if( ! isset( $_GET['contact'] ) ) {?>  style="display:none" <?php } ?>>
214
			<?php if ( self::is_jetpack_support_open() ): ?>
215
				<form id="contactme" method="post" action="https://jetpack.com/contact-support/">
216
					<input type="hidden" name="action" value="submit">
217
					<input type="hidden" name="jetpack" value="needs-service">
218
219
					<input type="hidden" name="contact_form" id="contact_form" value="1">
220
					<input type="hidden" name="blog_url" id="blog_url" value="<?php echo esc_attr( site_url() ); ?>">
221
					<?php
222
						$subject_line = sprintf(
223
							/* translators: %s is the URL of the site */
224
							_x( 'from: %s Jetpack contact form', 'Support request email subject line', 'jetpack' ),
225
							esc_attr( site_url() )
226
						);
227
228
						if ( Jetpack::is_development_version() ) {
229
							$subject_line = 'BETA ' . $subject_line;
230
						}
231
232
						$subject_line_input = printf(
0 ignored issues
show
$subject_line_input is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
233
							'<input type="hidden" name="subject" id="subject" value="%s"">',
234
							$subject_line
235
						);
236
					?>
237
					<div class="formbox">
238
						<label for="message" class="h"><?php esc_html_e( 'Please describe the problem you are having.', 'jetpack' ); ?></label>
239
						<textarea name="message" cols="40" rows="7" id="did"></textarea>
240
					</div>
241
242
					<div id="name_div" class="formbox">
243
						<label class="h" for="your_name"><?php esc_html_e( 'Name', 'jetpack' ); ?></label>
244
			  			<span class="errormsg"><?php esc_html_e( 'Let us know your name.', 'jetpack' ); ?></span>
245
						<input name="your_name" type="text" id="your_name" value="<?php esc_html_e( $current_user->display_name, 'jetpack'); ?>" size="40">
246
					</div>
247
248
					<div id="email_div" class="formbox">
249
						<label class="h" for="your_email"><?php esc_html_e( 'E-mail', 'jetpack' ); ?></label>
250
			  			<span class="errormsg"><?php esc_html_e( 'Use a valid email address.', 'jetpack' ); ?></span>
251
						<input name="your_email" type="text" id="your_email" value="<?php esc_html_e( $current_user->user_email, 'jetpack'); ?>" size="40">
252
					</div>
253
254
					<div id="toggle_debug_form_info" class="formbox">
255
						<p><?php _e( 'The test results and some other useful debug information will be sent to the support team. Please feel free to <a href="#">review/modify</a> this information.', 'jetpack' ); ?></p>
256
					</div>
257
258
					<div id="debug_info_form_div" class="formbox" style="display:none">
259
						<label class="h" for="debug_info"><?php esc_html_e( 'Debug Info', 'jetpack' ); ?></label>
260
			  			<textarea name="debug_info" cols="40" rows="7" id="debug_form_info"><?php echo esc_attr( $debug_info ); ?></textarea>
261
					</div>
262
263
					<div style="clear: both;"></div>
264
265
					<div id="blog_div" class="formbox">
266
						<div id="submit_div" class="contact-support">
267
						<input type="submit" name="submit" value="<?php esc_html_e( 'Submit &#187;', 'jetpack' ); ?>">
268
						</div>
269
					</div>
270
					<div style="clear: both;"></div>
271
				</form>
272
			<?php endif; ?>
273
		</div> <!-- contact-message, hidden by default. -->
274
		<div id="toggle_debug_info"><a href="#"><?php _e( 'View Advanced Debug Results', 'jetpack' ); ?></a></div>
275
			<div id="debug_info_div" style="display:none">
276
			<h4><?php esc_html_e( 'Debug Info', 'jetpack' ); ?></h4>
277
			<div id="debug_info"><?php echo wpautop( esc_html( $debug_info ) ); ?></div>
278
		</div>
279
		</div>
280
	<?php
281
	}
282
283
	public static function jetpack_debug_admin_head() {
284
		?>
285
		<style type="text/css">
286
287
			.jetpack-debug-test-container {
288
				margin-top: 20px;
289
				margin-bottom: 30px;
290
			}
291
292
			.jetpack-tests-succed {
293
				font-size: large;
294
				color: #8BAB3E;
295
			}
296
297
			.jetpack-test-details {
298
				margin: 4px 6px;
299
				padding: 10px;
300
				overflow: auto;
301
				display: none;
302
			}
303
304
			.jetpack-test-error {
305
				margin-bottom: 10px;
306
				background: #FFEBE8;
307
				border: solid 1px #C00;
308
				border-radius: 3px;
309
			}
310
311
			.jetpack-test-error p {
312
				margin: 0;
313
				padding: 0;
314
			}
315
316
			.jetpack-test-error a.jetpack-test-heading {
317
				padding: 4px 6px;
318
				display: block;
319
				text-decoration: none;
320
				color: inherit;
321
			}
322
323
			.jetpack-test-error .noticon {
324
				float: right;
325
			}
326
327
			form#contactme {
328
				border: 1px solid #dfdfdf;
329
				background: #eaf3fa;
330
				padding: 20px;
331
				margin: 10px;
332
				background-color: #eaf3fa;
333
				border-radius: 5px;
334
				font-size: 15px;
335
				font-family: "Open Sans", "Helvetica Neue", sans-serif;
336
			}
337
338
			form#contactme label.h {
339
				color: #444;
340
				display: block;
341
				font-weight: bold;
342
				margin: 0 0 7px 10px;
343
				text-shadow: 1px 1px 0 #fff;
344
			}
345
346
			.formbox {
347
				margin: 0 0 25px 0;
348
			}
349
350
			.formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea, #debug_info_div {
351
				border: 1px solid #e5e5e5;
352
				border-radius: 11px;
353
				box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
354
				color: #666;
355
				font-size: 14px;
356
				padding: 10px;
357
				width: 97%;
358
			}
359
			.formbox .contact-support input[type="submit"] {
360
				float: right;
361
				margin: 0 !important;
362
				border-radius: 20px !important;
363
				cursor: pointer;
364
				font-size: 13pt !important;
365
				height: auto !important;
366
				margin: 0 0 2em 10px !important;
367
				padding: 8px 16px !important;
368
				background-color: #ddd;
369
				border: 1px solid rgba(0,0,0,0.05);
370
				border-top-color: rgba(255,255,255,0.1);
371
				border-bottom-color: rgba(0,0,0,0.15);
372
				color: #333;
373
				font-weight: 400;
374
				display: inline-block;
375
				text-align: center;
376
				text-decoration: none;
377
			}
378
379
			.formbox span.errormsg {
380
				margin: 0 0 10px 10px;
381
				color: #d00;
382
				display: none;
383
			}
384
385
			.formbox.error span.errormsg {
386
				display: block;
387
			}
388
389
			#contact-message ul {
390
				margin: 0 0 20px 10px;
391
			}
392
393
			#contact-message li {
394
				margin: 0 0 10px 10px;
395
				list-style: disc;
396
				display: list-item;
397
			}
398
399
			#debug_info_div, #toggle_debug_info, #debug_info_div p {
400
				font-size: smaller;
401
			}
402
403
		</style>
404
		<script type="text/javascript">
405
		jQuery( document ).ready( function($) {
406
407
			$( '#debug_info' ).prepend( 'jQuery version: ' + jQuery.fn.jquery + "\r\n" );
408
			$( '#debug_form_info' ).prepend( 'jQuery version: ' + jQuery.fn.jquery + "\r\n" );
409
410
			$( '.jetpack-test-error .jetpack-test-heading' ).on( 'click', function() {
411
				$( this ).parents( '.jetpack-test-error' ).find( '.jetpack-test-details' ).slideToggle();
412
				return false;
413
			} );
414
415
			$( '.jetpack-show-contact-form a' ).on( 'click', function() {
416
				$( '#contact-message' ).slideToggle();
417
				return false;
418
			} );
419
420
			$( '#toggle_debug_info a' ).on( 'click', function() {
421
				$( '#debug_info_div' ).slideToggle();
422
				return false;
423
			} );
424
425
			$( '#toggle_debug_form_info a' ).on( 'click', function() {
426
				$( '#debug_info_form_div' ).slideToggle();
427
				return false;
428
			} );
429
430
			$( 'form#contactme' ).on( "submit", function(e){
431
				var form = $( this );
432
				var message = form.find( '#did' );
433
				var name = form.find( '#your_name' );
434
				var email = form.find( '#your_email' )
435
				var validation_error = false;
436
				if( !name.val() ) {
437
					name.parents( '.formbox' ).addClass( 'error' );
438
					validation_error = true;
439
				}
440
				if( !email.val() ) {
441
					email.parents( '.formbox' ).addClass( 'error' );
442
					validation_error = true;
443
				}
444
				if ( validation_error ) {
445
					return false;
446
				}
447
				message.val( message.val() + "\r\n\r\n----------------------------------------------\r\n\r\nDEBUG INFO:\r\n" + $('#debug_info').val()  );
448
				return true;
449
	    	});
450
451
		} );
452
		</script>
453
		<?php
454
	}
455
}
456