Skip to content

Commit

Permalink
mysqli field_count nullref check
Browse files Browse the repository at this point in the history
ref: #1162
  • Loading branch information
jakubmisek committed Feb 25, 2025
1 parent f07ce7f commit bf1c27d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Peachpie.Library.MySql/MySqli/mysqli.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ internal mysqli(Context ctx, IDbConnection dbconnection)
/// <summary>
/// Returns the number of columns for the most recent query.
/// </summary>
public int field_count => Connection.LastResult.FieldCount;
public int field_count => Connection.LastResult?.FieldCount ?? 0;

/// <summary>
/// Get MySQL client info.
Expand Down

0 comments on commit bf1c27d

Please sign in to comment.