Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Checking for existence before accessing to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
asedano committed Sep 27, 2018
1 parent 11e9462 commit e7667c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/acf_5/fields/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function render_field($field) {

// special atts
foreach( $s as $k ) {
if( $field[ $k ] ) {
if( isset($field[ $k ]) && $field[ $k ] ) {
$atts[ $k ] = $k;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/acf_5/fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function render_field($field) {

// special atts
foreach( $s as $k ) {
if( $field[ $k ] ) {
if( isset($field[ $k ]) && $field[ $k ] ) {
$atts[ $k ] = $k;
}
}
Expand Down

0 comments on commit e7667c7

Please sign in to comment.