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 26th April 2024 08:05 Europe/London time based on the source file dated 15th April 2024 16:05 Europe/London time.