• Resolved amityweb

    (@amityweb)


    Error in plugin, assume from recent update:

    PHP Parse error: syntax error, unexpected ')' in /home/mysite/public_html/wp-content/plugins/meta-box/inc/fields/file-input.php on line 55, referer: https://www.supercomputing.wales/wp-login.php

    Looking at the code, a trailing comma in sprintf on line 40 after esc_html__( ‘Remove’, ‘meta-box’ ) causes it.

    So change:

    return sprintf(
    			'<div class="rwmb-file-input-image %s">
    				<img src="%s">
    			</div>
    			<div class="rwmb-file-input-inner">
    				<input %s>
    				<a href="#" class="rwmb-file-input-select button">%s</a>
    				<a href="#" class="rwmb-file-input-remove button %s">%s</a>
    			</div>',
    			in_array( $file_ext, $extensions ) ? '' : 'rwmb-file-input-hidden',
    			$meta,
    			self::render_attributes( $attributes ),
    			esc_html__( 'Select', 'meta-box' ),
    			$meta ? '' : 'hidden',
    			esc_html__( 'Remove', 'meta-box' ),
    		);

    To:

    return sprintf(
    			'<div class="rwmb-file-input-image %s">
    				<img src="%s">
    			</div>
    			<div class="rwmb-file-input-inner">
    				<input %s>
    				<a href="#" class="rwmb-file-input-select button">%s</a>
    				<a href="#" class="rwmb-file-input-remove button %s">%s</a>
    			</div>',
    			in_array( $file_ext, $extensions ) ? '' : 'rwmb-file-input-hidden',
    			$meta,
    			self::render_attributes( $attributes ),
    			esc_html__( 'Select', 'meta-box' ),
    			$meta ? '' : 'hidden',
    			esc_html__( 'Remove', 'meta-box' )
    		);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Parse error: syntax error, unexpected ‘)’ in ….file-input.php on line 55’ is closed to new replies.