Skip to content

Commit

Permalink
Quick Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Mar 20, 2024
1 parent 63b945d commit 8da279a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/cms/cck/plugin/typo.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function g_hasLink( &$field, $typo, $value, &$config = array() )
if ( isset( $field->link ) && $field->link != '' ) {
$applyLink = ( isset( $field->link_state ) ) ? $field->link_state : 1;

if ( $applyLink && strpos( $value, '<a href' ) === false ) {
if ( $applyLink && is_string( $value ) && strpos( $value, '<a href' ) === false ) {
return '<a href="'.$field->link.'"'.JCckPluginLink::getLinkAttr( $field ).'>'.$value.'</a>';
}
}
Expand Down
6 changes: 5 additions & 1 deletion plugins/cck_field_live/url_variable/url_variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ public function onCCK_Field_LivePrepareForm( &$field, &$value = '', &$config = a
// Keep Context
if ( /* $config['client'] == 'site' || */ $config['client'] == 'search' /* || $config['client'] == 'admin' */ ) {
if ( !isset( $config['context'][$variable] ) ) {
$config['context'][$variable] = (string)$live;
if ( is_array( $live ) ) {
$config['context'][$variable] = implode( ',', $live );
} else {
$config['context'][$variable] = (string)$live;
}
}
}
}
Expand Down

0 comments on commit 8da279a

Please sign in to comment.