Skip to content

Commit

Permalink
feat(cloud): Save progress.
Browse files Browse the repository at this point in the history
build: [skip-ci]
  • Loading branch information
lots0logs committed Oct 7, 2020
1 parent 820f2b7 commit d4fa961
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ function et_debug( $msg, int $bt_index = 4, bool $log_ajax = true ): void {
* @since 1.1.0
*/
function et_error( $msg, $bt_index = 4, $log_ajax = true ): void {
if ( ! is_scalar( $msg ) ) {
$msg = print_r( $msg, true );
}

Logger::error( "[ERROR]: {$msg}", $bt_index, $log_ajax );
}

Expand All @@ -39,6 +43,10 @@ function et_error( $msg, $bt_index = 4, $log_ajax = true ): void {
* @since 1.1.0
*/
function et_wrong( $msg, bool $error = false ): void {
if ( ! is_scalar( $msg ) ) {
$msg = print_r( $msg, true );
}

$msg = "You're Doing It Wrong! {$msg}";

if ( $error ) {
Expand Down

0 comments on commit d4fa961

Please sign in to comment.