HEX
Server: Apache/2
System: Linux localhost 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
User: rasad (1007)
PHP: 7.4.33
Disabled: shell_exec,system,passthru,exec,popen,ini_restore,socket_create,socket_create_listen,socket_create_pair,socket_listen,socket_bind,symlink,link,pfsockopen,ini_alter,dl,pcntl_exec,pcntl_fork,proc_close,proc_open,proc_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_uname,show_source,getfile,mkfifo
Upload Files
File: /home/rasad/public_html/wp-content/plugins/duplicator/src/Libs/OneClickUpgrade/ConnectSkin.php
<?php

namespace Duplicator\Libs\OneClickUpgrade;

use Duplicator\Libs\OneClickUpgrade\PluginSilentUpgraderSkin;
use DUP_Log;

/**
 * Duplicator Connect Skin.
 *
 * Duplicator Connect is our service that makes it easy for non-techy users to
 * upgrade to Duplicator Pro without having to manually install Duplicator Pro plugin.
 *
 * @since 1.5.5
 * @since 1.5.6.1 Extend PluginSilentUpgraderSkin and clean up the class.
 */
class ConnectSkin extends PluginSilentUpgraderSkin
{
    /**
     * Instead of outputting HTML for errors, json_encode the errors and send them
     * back to the Ajax script for processing.
     *
     * @since 1.5.5
     *
     * @param array $errors Array of errors with the install process.
     *
     * @return void
     */
    public function error($errors)
    {
        if (! empty($errors)) {
            DUP_Log::traceObject("Array of errors with the install process:", $errors);
            echo \wp_json_encode(
                array(
                    'error' => \esc_html__('There was an error installing Duplicator Pro. Please try again.', 'duplicator'),
                )
            );
            die;
        }
    }
}