403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.216.46
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/otel-vershina.ru/dup-installer/src/Utils/Tests/WP/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/otel-vershina.ru/dup-installer/src/Utils/Tests/WP/tests_template.php
<?php

namespace Duplicator\Installer\Utils\Tests\WP;

use Duplicator\Installer\Utils\Autoloader;
use Duplicator\Libs\Snap\SnapUtil;
use Duplicator\Installer\Utils\Tests\MessageCustomizer;
use DUPX_NOTICE_ITEM;
use DUPX_NOTICE_MANAGER;
use Exception;

// phpcs:disable
die(); // [REMOVE LINE BY SCRIPT] don't remove/change this *********************************

if (!defined('DUPXABSPATH')) {
    define('DUPXABSPATH', dirname(__FILE__));
}

if (!defined('DUPX_INIT')) {
    define('DUPX_INIT', '$_$_DUPX_INIT_$_$');
}
// phpcs:enable

require_once(DUPX_INIT . '/src/Utils/Autoloader.php');
Autoloader::register();

require_once(DUPX_INIT . '/classes/utilities/class.u.notices.manager.php');
$GLOBALS["NOTICES_FILE_PATH"] = '$_$_NOTICES_FILE_PATH_$_$';

$GLOBALS["TEST_SCRIPT"] = SnapUtil::filterInputDefaultSanitizeString(INPUT_GET, 'dpro_test_script_name');
ob_start();
TestsErrorHandler::register();
TestsErrorHandler::setShutdownCallabck(function ($errors) {

    $nManager     = DUPX_NOTICE_MANAGER::getInstance();
    $scriptName   = basename($GLOBALS["TEST_SCRIPT"]);
    $scriptNameId = str_replace(array('.', '-', '#'), '_', $scriptName);
    $firstFatal   = true;
    $firstNotice  = true;

    switch ($scriptName) {
        case 'index.php':
            $shortMessageFatal  = 'Fatal error on WordPress front-end tests!';
            $shortMessageNotice = 'Warnings or notices on WordPress front-end tests!';
            $fatalErrorLevel    = DUPX_NOTICE_ITEM::CRITICAL;
            break;
        case 'wp-login.php':
            $shortMessageFatal  = 'Fatal error on WordPress login tests!';
            $shortMessageNotice = 'Warnings or notices on WordPress backend tests!';
            $fatalErrorLevel    = DUPX_NOTICE_ITEM::FATAL;
            break;
        default:
            $shortMessageFatal  = 'Fatal error on php script ' . $scriptName;
            $shortMessageNotice = 'Warnings or notices on php script ' . $scriptName;
            $fatalErrorLevel    = DUPX_NOTICE_ITEM::CRITICAL;
            break;
    }

    foreach ($errors as $error) {
        $addBeforeNotice = false;
        switch ($error['error_cat']) {
            case TestsErrorHandler::ERR_TYPE_ERROR:
                $noticeId     = 'wptest_fatal_error_' . $scriptNameId;
                $errorLevel   = $fatalErrorLevel;
                $shortMessage = $shortMessageFatal;
                if ($firstFatal) {
                    $addBeforeNotice = true;
                    $firstFatal      = false;
                }

                break;
            case TestsErrorHandler::ERR_TYPE_NOTICE:
            case TestsErrorHandler::ERR_TYPE_DEPRECATED:
            case TestsErrorHandler::ERR_TYPE_WARNING:
            default:
                $noticeId     = 'wptest_notice_' . $scriptNameId;
                $errorLevel   = DUPX_NOTICE_ITEM::NOTICE;
                $shortMessage = $shortMessageNotice;
                if ($firstNotice) {
                    $addBeforeNotice = true;
                    $firstNotice     = false;
                }
                break;
        }

        if ($addBeforeNotice) {
            $longMessage = 'SCRIPT FILE TEST: ' . $GLOBALS["TEST_SCRIPT"] . "\n\n";
        } else {
            $longMessage = '';
        }
        $longMessage .= TestsErrorHandler::errorToString($error) . "\n-----\n\n";
        $longMessage .= "For solutions to these issues see the online FAQs \nhttps://snapcreek.com/duplicator/docs \n\n";

        MessageCustomizer::applyAllNoticeCustomizations($shortMessage, $longMessage, $noticeId);
        $data = array(
            'shortMsg'    => $shortMessage,
            'level'       => $errorLevel,
            'longMsgMode' => DUPX_NOTICE_ITEM::MSG_MODE_PRE,
            'longMsg'     => $longMessage,
            'sections'    => 'general'
        );
        if ($errorLevel == DUPX_NOTICE_ITEM::FATAL) {
            $nManager->addBothNextAndFinalReportNotice($data, DUPX_NOTICE_MANAGER::ADD_UNIQUE_APPEND, $noticeId);
        } else {
            $nManager->addFinalReportNotice($data, DUPX_NOTICE_MANAGER::ADD_UNIQUE_APPEND, $noticeId);
        }
    }

    if ($nManager->saveNotices()) {
        echo json_encode(true);
    } else {
        echo json_encode(false);
    }
});

$_SERVER['REQUEST_URI'] = '/';
if (file_exists($GLOBALS["TEST_SCRIPT"])) {
    require_once($GLOBALS["TEST_SCRIPT"]);
} else {
    throw new Exception('test script file ' . $GLOBALS["TEST_SCRIPT"] . ' doesn\'t exist');
}

Youez - 2016 - github.com/yon3zu
LinuXploit