Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

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 523 to 526

Definition

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

This article was last updated 19th March 2024 05:05 Europe/London time based on the source file dated 26th February 2024 11:00 Europe/London time.