Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Notice: require(): read of 8362 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/all-in-one-event-calendar/all-in-one-event-calendar.php on line 38
Notice: require(): read of 8362 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/all-in-one-event-calendar/all-in-one-event-calendar.php on line 38
aram string $message Message to be displayed to admin
*
* @return void Method does not return
*/
public function show_notices( $message ) {
// save the message to use it later
$this->_message = $message;
add_action( 'admin_notices', array( $this, 'render_admin_notice' ) );
}
/**
* Render HTML snipped to be displayed as a notice to admin
*
* @hook admin_notices When plugin is soft-disabled
*
* @return void Method does not return
*/
public function render_admin_notice() {
$redirect_url = esc_url( add_query_arg(
self::DB_REACTIVATE_PLUGIN,
'true',
get_admin_url()
) );
$label = __(
'All-in-One Event Calendar has been disabled due to an error:',
AI1EC_PLUGIN_NAME
);
$message = '';
echo $message;
}
/**
* Redirect the user either to the front page or the dashbord page
*
* @return void Method does not return
*/
protected function redirect( $suggested_url = null ) {
$url = ai1ec_get_site_url();
if ( is_admin() ) {
$url = null !== $suggested_url
? $suggested_url
: ai1ec_get_admin_url();
}
Ai1ec_Http_Response_Helper::redirect( $url );
}
/**
* Had to add it as var_dump was locking my browser.
*
* Taken from http://www.leaseweblabs.com/2013/10/smart-alternative-phps-var_dump-function/
*
* @param mixed $variable
* @param int $strlen
* @param int $width
* @param int $depth
* @param int $i
* @param array $objects
*
* @return string
*/
public function var_debug(
$variable,
$strlen = 400,
$width = 25,
$depth = 10,
$i = 0,
&$objects = array()
) {
$search = array( "\0", "\a", "\b", "\f", "\n", "\r", "\t", "\v" );
$replace = array( '\0', '\a', '\b', '\f', '\n', '\r', '\t', '\v' );
$string = '';
switch ( gettype( $variable ) ) {
case 'boolean' :
$string .= $variable ? 'true' : 'false';
break;
case 'integer' :
$string .= $variable;
break;
case 'double' :
$string .= $variable;
break;
case 'resource' :
$string .= '[resource]';
break;
case 'NULL' :
$string .= "null";
break;
case 'unknown type' :
$string .= '???';
break;
case 'string' :
$len = strlen( $variable );
$variable = str_replace(
$search,
$replace,
substr( $variable, 0, $strlen ),
$count );
$variable = substr( $variable, 0, $strlen );
if ( $len < $strlen ) {
$string .= '"' . $variable . '"';
} else {
$string .= 'string(' . $len . '): "' . $variable . '"...';
}
break;
case 'array' :
$len = count( $variable );
if ( $i == $depth ) {
$string .= 'array(' . $len . ') {...}';
} elseif ( ! $len) {
$string .= 'array(0) {}';
} else {
$keys = array_keys( $variable );
$spaces = str_repeat( ' ', $i * 2 );
$string .= "array($len)\n" . $spaces . '{';
$count = 0;
foreach ( $keys as $key ) {
if ( $count == $width ) {
$string .= "\n" . $spaces . " ...";
break;
}
$string .= "\n" . $spaces . " [$key] => ";
$string .= $this->var_debug(
$variable[$key],
$strlen,
$width,
$depth,
$i + 1,
$objects
);
$count ++;
}
$string .= "\n" . $spaces . '}';
}
break;
case 'object':
$id = array_search( $variable, $objects, true );
if ( $id !== false ) {
$string .= get_class( $variable ) . '#' . ( $id + 1 ) . ' {...}';
} else if ( $i == $depth ) {
$string .= get_class( $variable ) . ' {...}';
} else {
$id = array_push( $objects, $variable );
$array = ( array ) $variable;
$spaces = str_repeat( ' ', $i * 2 );
$string .= get_class( $variable ) . "#$id\n" . $spaces . '{';
$properties = array_keys( $array );
foreach ( $properties as $property ) {
$name = str_replace( "\0", ':', trim( $property ) );
$string .= "\n" . $spaces . " [$name] => ";
$string .= $this->var_debug(
$array[$property],
$strlen,
$width,
$depth,
$i + 1,
$objects
);
}
$string .= "\n" . $spaces . '}';
}
break;
}
if ( $i > 0 ) {
return $string;
}
$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
do {
$caller = array_shift( $backtrace );
} while (
$caller &&
! isset( $caller['file'] )
);
if ( $caller ) {
$string = $caller['file'] . ':' . $caller['line'] . "\n" . $string;
}
echo nl2br( str_replace( ' ', ' ', htmlentities( $string ) ) );
}
/**
* Get HTML code with backtrace information for given exception.
*
* @param Exception $exception
*
* @return string HTML code.
*/
protected function _get_backtrace( $exception ) {
$backtrace = '';
$trace = nl2br( $exception->getTraceAsString() );
$ident = sha1( $trace );
if ( ! empty( $trace ) ) {
$request_uri = '';
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// Remove all whitespaces
$request_uri = preg_replace( '/\s+/', '', $_SERVER['REQUEST_URI'] );
// Convert request URI and strip tags
$request_uri = strip_tags( htmlspecialchars_decode( $request_uri ) );
// Limit URL to 100 characters
$request_uri = substr($request_uri, 0, 100);
}
$button_label = __( 'Toggle error details', AI1EC_PLUGIN_NAME );
$title = __( 'Error Details:', AI1EC_PLUGIN_NAME );
$backtrace = <<
jQuery( function($) {
$( "a[data-rel='$ident']" ).click( function() {
jQuery( "#ai1ec-error-$ident" ).slideToggle( "fast" );
return false;
});
});
$title
$trace
Request Uri: $request_uri
$button_label
JAVASCRIPT;
}
return $backtrace;
}
}
Fatal error: Uncaught Error: Class 'Ai1ec_Exception_Handler' not found in /var/www/html/ticnews.com.br/web/wp-content/plugins/all-in-one-event-calendar/all-in-one-event-calendar.php:42
Stack trace:
#0 /var/www/html/ticnews.com.br/web/wp-settings.php(362): include_once()
#1 /var/www/html/ticnews.com.br/web/wp-config.php(83): require_once('/var/www/html/t...')
#2 /var/www/html/ticnews.com.br/web/wp-load.php(37): require_once('/var/www/html/t...')
#3 /var/www/html/ticnews.com.br/web/wp-blog-header.php(13): require_once('/var/www/html/t...')
#4 /var/www/html/ticnews.com.br/web/index.php(17): require('/var/www/html/t...')
#5 {main}
thrown in /var/www/html/ticnews.com.br/web/wp-content/plugins/all-in-one-event-calendar/all-in-one-event-calendar.php on line 42