> $is_azure_authenticathed
false
boolean
> $token
CWP_Error object()
Properties
- ->
- errors
- =
- array(1)
- 1020
- =>
- array(1)
- 0
- =>
- Cannot retrieve an access token for scope https://graph.microsoft.com/User.Read.All when no logged-on user is detected and the use of an app-only access token has not been configured. See <a href="https://docs.wpo365.com/article/23-integrationn" target="_blank">https://docs.wpo365.com/article/23-integration</a> for more information.
- ->
- error_data
- =
- array()
- ->
- P
- additional_data
- =
- array()
Methods
- ->
- __construct($code = "", $message = "", $data = "")
- ->
- get_error_codes()
- ->
- get_error_code()
- ->
- get_error_messages($code = "")
- ->
- get_error_message($code = "")
- ->
- get_error_data($code = "")
- ->
- has_errors()
- ->
- add($code, $message, $data = "")
- ->
- add_data($data, $code = "")
- ->
- get_all_error_data($code = "")
- ->
- remove($code)
- ->
- merge_from(CWP_Error $error)
- ->
- export_to(CWP_Error $error)
- ::
- P
- copy_errors(CWP_Error $from, CWP_Error $to)
Cloneable
WordPress Error class.Container for checking for WordPress errors and error messages. Return WP_Error and use is_wp_error() to check if this class is returned. Many core WordPress functions pass this class in the event of an error and if not handled properly will result in code errors. @since2.1.0Defined in class-wp-error.php:19
array Stores the list of errors.
Key: integer
string(334)
array Stores the most recently added data for each error code.
Protected
array[] Stores previously added data added for error codes, oldest-to-newest by code.
string|int Error code.
string(0)
string Error message.
mixed Optional. Error data. Default empty string.
Initializes the error.If `$code` is empty, the other parameters will be ignored. When `$code` is not empty, `$message` will be used even if it is empty. The `$data` parameter will be used only if it is not empty. Though the class is constructed with a single error code and message, multiple codes can be added using the `add()` method. @since2.1.0 @paramstring|int $codeError code.@paramstring $messageError message.@parammixed $dataOptional. Error data. Default empty string.Defined in class-wp-error.php:61
Retrieves all error codes. @since2.1.0 @returnarrayList of error codes, if available.Defined in class-wp-error.php:76
Retrieves the first error code available. @since2.1.0 @returnstring|intEmpty string, if no error codes.Defined in class-wp-error.php:91
string|int Optional. Error code to retrieve the messages for. Default empty string.
Retrieves all error messages, or the error messages for the given error code. @since2.1.0 @paramstring|int $codeOptional. Error code to retrieve the messages for. Default empty string.@returnstring[]Error strings on success, or empty array if there are none.Defined in class-wp-error.php:110
string|int Optional. Error code to retrieve the message for. Default empty string.
Gets a single error message.This will get the first message available for the code. If no code is given then the first code available will be used. @since2.1.0 @paramstring|int $codeOptional. Error code to retrieve the message for. Default empty string.@returnstringThe error message.Defined in class-wp-error.php:140
string|int Optional. Error code. Default empty string.
Retrieves the most recently added error data for an error code. @since2.1.0 @paramstring|int $codeOptional. Error code. Default empty string.@returnmixedError data, if it exists.Defined in class-wp-error.php:159
Verifies if the instance contains errors. @since5.1.0 @returnboolIf the instance contains errors.Defined in class-wp-error.php:176
Adds an error or appends an additional message to an existing error. @since2.1.0 @paramstring|int $codeError code.@paramstring $messageError message.@parammixed $dataOptional. Error data. Default empty string.Defined in class-wp-error.php:192
mixed Error data.
Adds data to an error with the given code. @since2.1.0@since5.6.0 Errors can now contain more than one item of error data. {@see WP_Error::$additional_data}. @parammixed $dataError data.@paramstring|int $codeError code.Defined in class-wp-error.php:221
Retrieves all error data for an error code in the order in which the data was added. @since5.6.0 @paramstring|int $codeError code.@returnmixed[]Array of error data, if it exists.Defined in class-wp-error.php:241
Removes the specified error.This function removes all error messages associated with the specified error code, along with any error data for that code. @since4.1.0 @paramstring|int $codeError code.Defined in class-wp-error.php:269
WP_Error Error object to merge.
Merges the errors in the given error object into this one. @since5.6.0 @paramWP_Error $errorError object to merge.Defined in class-wp-error.php:282
WP_Error Error object to export into.
Exports the errors in this object into the given one. @since5.6.0 @paramWP_Error $errorError object to export into.Defined in class-wp-error.php:293
WP_Error The WP_Error to copy from.
WP_Error The WP_Error to copy to.
Copies errors from one WP_Error instance to another. @since5.6.0 @paramWP_Error $fromThe WP_Error to copy from.@paramWP_Error $toThe WP_Error to copy to.Defined in class-wp-error.php:305
> $user_read_all
null
> $fp_get_user_department
null
> $fp_get_groups_test
{"error":{"code":"InvalidAuthenticationToken","message":"ArgumentNull","innerError":{"date":"2025-12-28T07:12:58","request-id":"d3b8f365-48e2-4830-a6fc-2182c6e1cc05","client-request-id":"d3b8f365-48e2-4830-a6fc-2182c6e1cc05"}}}
jsonCstdClass object()
regex{"error":{"code":"InvalidAuthenticationToken","message":"ArgumentNull","innerError":{"date":"2025-12-28T07:12:58","request-id":"d3b8f365-48e2-4830-a6fc-2182c6e1cc05","client-request-id":"d3b8f365-48e2-4830-a6fc-2182c6e1cc05"}}}
Properties
- ->
- error
- =
- CstdClass object()
Properties
- ->
- code
- =
- InvalidAuthenticationToken
- ->
- message
- =
- ArgumentNull
- ->
- innerError
- =
- CstdClass object()
Properties
- ->
- date
- =
- 2025-12-28T07:12:58
- ->
- request-id
- =
- d3b8f365-48e2-4830-a6fc-2182c6e1cc05
- ->
- client-request-id
- =
- d3b8f365-48e2-4830-a6fc-2182c6e1cc05
Cloneable
Internal - part of Core (8.3.28)
string(26)
string(12)
string(19)
string(36)
string(227)
> $fp_get_groups_simple_test
array()