fusion_stop()

Declares FUSION_NULL constants to safeguard sensitive code execution.

Versions: 9

fusion_stop( [ string $notice ] ) : void

PHP-Fusion uses a FUSION_NULL constant to indicate there is a impending error that is going to happen soon to your system. This constant is used throughtout the entire system and fundamentally functions to complete the PHP-Fusion security feature ecosystem.

When validation fails in a particular subset of inputs, other functions built into deep sensing of the declaration of FUSION_NULL constant will stop its intended function execution. This is particularly useful when developers intend to stop something from happening should such constant is being declared.

Declares FUSION_NULL in the PHP-Fusion system. Some important components that is built to sense FUSION_NULL are: dbquery_insert() and fusion_safe()

Parameters

$notice (string) (Optional) The notification text. If present, will show a notice on page load. Default value: null

Return Values

No value is returned.

Examples

An example implementation is to use fusion_stop() to halt the system, and safeguarded by the fusion_safe() function.

if (!isnum('Some bad input')) {
fusion_stop('The $number string must be a number.');
}
‚Äč
if (fusion_safe()) {
// ... do something data sensitive like storage or callback
}