| @@ -216,15 +216,15 @@ | ||
| 216 | 216 | */ |
| 217 | 217 | public function update( $new_instance, $old_instance ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 218 | 218 | $instance = array(); |
| 219 | 219 | |
| 220 | - $instance['title'] = trim( wp_strip_all_tags( stripslashes( $new_instance['title'] ) ) ); | |
| 220 | + $instance['title'] = trim( wp_strip_all_tags( stripslashes( $new_instance['title'] ?? '' ) ) ); | |
| 221 | 221 | |
| 222 | 222 | // Set up widget values. |
| 223 | 223 | $instance['like_args'] = array( |
| 224 | - 'href' => trim( wp_strip_all_tags( stripslashes( $new_instance['href'] ) ) ), | |
| 225 | - 'width' => (int) $new_instance['width'], | |
| 226 | - 'height' => (int) $new_instance['height'], | |
| 224 | + 'href' => trim( wp_strip_all_tags( stripslashes( $new_instance['href'] ?? '' ) ) ), | |
| 225 | + 'width' => (int) ( $new_instance['width'] ?? $this->default_width ), | |
| 226 | + 'height' => (int) ( $new_instance['height'] ?? $this->default_height ), | |
| 227 | 227 | 'show_faces' => isset( $new_instance['show_faces'] ), |
| 228 | 228 | 'stream' => isset( $new_instance['stream'] ), |
| 229 | 229 | 'cover' => isset( $new_instance['cover'] ), |
| 230 | 230 | 'small_header' => isset( $new_instance['small_header'] ), |