add_action( 'plugins_loaded', 'spx_newsletters_init' );
function spx_newsletters_start_session() {
if(!session_id()) {
session_start();
}
}
add_action('init', 'spx_newsletters_start_session', 1);
* @throws \ErrorException
*/
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
try {
parent::handleError($level, $message, $file, $line, $context);
} catch (Throwable $e) {
if (! apply_filters('acorn/throw_error_exception', true, $e)) {
return false;
}
add_action( 'plugins_loaded', 'spx_newsletters_init' );
function spx_newsletters_start_session() {
if(!session_id()) {
session_start();
}
}
add_action('init', 'spx_newsletters_start_session', 1);
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
*
* If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
*
* @since 1.5.0
*/
do_action( 'init' );
// Check site status.
if ( is_multisite() ) {
$file = ms_site_check();
if ( true !== $file ) {
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
* If neither set of conditions is true, initiate loading the setup process.
*/
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
/** The config file resides in ABSPATH */
require_once ABSPATH . 'wp-config.php';
} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
/** The config file resides one level above ABSPATH but is not part of another installation */
require_once dirname( ABSPATH ) . '/wp-config.php';
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
ErrorException
|
---|
ErrorException: session_start(): Session cannot be started after headers have already been sent at /home/catena/asktraders_com/wp-content/plugins/spx-newsletters/spx-newsletters.php:32 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/home/catena/asktraders_com/wp-content/themes/asktraders2022/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:55) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() at session_start() (/home/catena/asktraders_com/wp-content/plugins/spx-newsletters/spx-newsletters.php:32) at spx_newsletters_start_session() (/home/catena/asktraders_com/wp-includes/class-wp-hook.php:308) at WP_Hook->apply_filters() (/home/catena/asktraders_com/wp-includes/class-wp-hook.php:332) at WP_Hook->do_action() (/home/catena/asktraders_com/wp-includes/plugin.php:517) at do_action() (/home/catena/asktraders_com/wp-settings.php:623) at require_once('/home/catena/asktraders_com/wp-settings.php') (/home/catena/asktraders_com/wp-config.php:136) at require_once('/home/catena/asktraders_com/wp-config.php') (/home/catena/asktraders_com/wp-load.php:50) at require_once('/home/catena/asktraders_com/wp-load.php') (/home/catena/asktraders_com/wp-blog-header.php:13) at require('/home/catena/asktraders_com/wp-blog-header.php') (/home/catena/asktraders_com/index.php:17) |