safe_export()

Description

Utility function to escape and replace any empty strings with NULLS for exported SQL scripts

Parameters

ColumnTypeDefaultDescription
$value: ?string
$value null|string Value to check

Return

string

Location

include/migration_functions.php lines 454 to 457

Definition

 
function safe_export(?string $value): string
{
    return 
trim($value ?? '') == "" "NULL" "'" escape_check($value) . "'";
}

This article was last updated 3rd June 2025 14:35 Europe/London time based on the source file dated 23rd May 2025 11:20 Europe/London time.