We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 12e3f4f + 2b3584a commit 1716ffeCopy full SHA for 1716ffe
1 file changed
classes/class-cpt-wplf-submission.php
@@ -263,7 +263,10 @@ function metabox_submission() {
263
264
// Show a link if the field corresponds to a URL
265
// assume values starting with '/' are root relative URLs and should be handled as links
266
- $value_is_url = $value[0] === '/' ? true : filter_var( $value, FILTER_VALIDATE_URL );
+ $value_is_url = false;
267
+ if ( strlen( $value ) > 0 ) {
268
+ $value_is_url = $value[0] === '/' ? true : filter_var( $value, FILTER_VALIDATE_URL );
269
+ }
270
if ( $value_is_url ) {
271
$link_text = __( 'Open Link', 'wp-libre-form' );
272
$possible_link = '<a target="_blank" href="' . $value . '" style="float:right">' . $link_text . '</a>';
0 commit comments