GhostManSec
Server: LiteSpeed
System: Linux premium117.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: eblama1 (1214)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/eblama1/mintawon.farm/wp-content/plugins/burst-statistics/includes/autoload.php
<?php
/**
 * Autoload PHP classes for the plugin.
 *
 * @package Burst
 */

spl_autoload_register(
	function ( $burst_class ): void {
		$prefix              = 'Burst\\';
		$team_updraft_prefix = 'TeamUpdraft\\';
		if ( strpos( $burst_class, $prefix ) === 0 ) {
			$strlen    = strlen( $prefix );
			$namespace = '';
		} elseif ( strpos( $burst_class, $team_updraft_prefix ) === 0 ) {
			$strlen    = strlen( $team_updraft_prefix );
			$namespace = 'TeamUpdraft/';
		} else {
			return;
		}

		$relative_class = $namespace . substr( $burst_class, $strlen );
		$path           = str_replace( '\\', '/', $relative_class );
		$class_name     = basename( $path );
		$dir            = dirname( $path );

		if ( $dir === '.' ) {
			$dir = '';
		} else {
			$dir .= '/';
		}

		$plugin_path = dirname( __DIR__, 1 ) . '/';
		// Build the class file path.
		$file = $plugin_path . "includes/{$dir}class-" . str_replace( '_', '-', strtolower( $class_name ) ) . '.php';
		if ( file_exists( $file ) ) {
			require_once $file;
			return;
		}

		$trait_file = $plugin_path . "includes/{$dir}trait-" . str_replace( '_', '-', strtolower( $class_name ) ) . '.php';
		if ( file_exists( $trait_file ) ) {
			require_once $trait_file;
			return;
		}

		// temporary fallback during upgrade.
		$file = $plugin_path . "src/{$dir}class-" . str_replace( '_', '-', strtolower( $class_name ) ) . '.php';
		if ( file_exists( $file ) ) {
			require_once $file;
			return;
		}

        // phpcs:ignore
		error_log( "Burst: Class $burst_class not found in $file or $trait_file" );
	}
);