_incorrectly_called

Description

Function is used to mark when another function is called incorrectly and informs when it is being used. This is only triggered when the APP_ENV constant in the root index.php file is set to DEV instead of PROD.

Usage

<?php _incorrectly_called($function_name, $message, $release); ?>

Parameters

$function_name (string) (required) The function that was called.

$message (string) (required) The message that should be printed.

$release (string) (required) The release of eduTrac SIS the message was added to.

Return Values

(string) Returns a message alerting to a function that was incorrectly called or used.

Examples

function get_student($id)
{
    if (!is_int($id)) {
        $message = _t('Invalid student ID: ID must be an integer.');
        _incorrectly_called(__FUNCTION__, $message, '6.1.12');
        return;
    }
}

Notes

Change Log

Since 6.2.0

Source File

_incorrectly_called is located in app/functions/hook-function.php.