[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
modules
/
variables
/
services
/
batch-operations
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 batch-error-formatter.php
1,054 B
SET
[ EDIT ]
|
[ DEL ]
📄 batch-processor.php
3,148 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: batch-error-formatter.php
<?php namespace Elementor\Modules\Variables\Services\Batch_Operations; use Exception; use Elementor\Modules\Variables\Storage\Exceptions\DuplicatedLabel; use Elementor\Modules\Variables\Storage\Exceptions\RecordNotFound; use Elementor\Modules\Variables\Storage\Exceptions\VariablesLimitReached; class Batch_Error_Formatter { private const ERROR_MAP = [ RecordNotFound::class => [ 'code' => 'variable_not_found', 'status' => 404, ], DuplicatedLabel::class => [ 'code' => 'duplicated_label', 'status' => 400, ], VariablesLimitReached::class => [ 'code' => 'invalid_variable_limit_reached', 'status' => 400, ], ]; public function status_for( Exception $e ): int { foreach ( self::ERROR_MAP as $class => $map ) { if ( $e instanceof $class ) { return $map['status']; } } return 500; } public function error_code_for( Exception $e ): string { foreach ( self::ERROR_MAP as $class => $map ) { if ( $e instanceof $class ) { return $map['code']; } } return 'unexpected_server_error'; } }