Skip to content

Commit

Permalink
Merge pull request #650 from 10up/fix/648
Browse files Browse the repository at this point in the history
Ensure the `default` key is set before we try accessing it
  • Loading branch information
Sidsector9 authored Jan 8, 2024
2 parents 9a2e041 + 106aff4 commit 064add6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/OpenAI/ChatGPT.php
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ function ( $prompt ) {

$prompts = array_map(
function ( $prompt ) use ( &$has_default ) {
$default = $prompt['default'] && ! $has_default;
$default = isset( $prompt['default'] ) && $prompt['default'] && ! $has_default;

if ( $default ) {
$has_default = true;
Expand Down

0 comments on commit 064add6

Please sign in to comment.