Make WordPress Core

Ticket #49329: 49329.diff

File 49329.diff, 1.4 KB (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/includes/class-wp-debug-data.php

     
    646646                        );
    647647                        $info['wp-server']['fields']['memory_limit']        = array(
    648648                                'label' => __( 'PHP memory limit' ),
    649                                 'value' => ini_get( 'memory_limit' ),
     649                                'value' => WP_Site_Health::get_instance()->php_memory_limit,
    650650                        );
    651651                        $info['wp-server']['fields']['max_input_time']      = array(
    652652                                'label' => __( 'Max input time' ),
  • src/wp-admin/includes/class-wp-site-health.php

     
    1818        private $health_check_mysql_required_version = '5.5';
    1919        private $health_check_mysql_rec_version      = '';
    2020
     21        public $php_memory_limit;
     22
    2123        public $schedules;
    2224        public $crons;
    2325        public $last_missed_cron     = null;
     
    3537
    3638                $this->prepare_sql_data();
    3739
     40                // Save memory limit before it's affected by wp_raise_memory_limit( 'admin' ).
     41                $this->php_memory_limit = ini_get( 'memory_limit' );
     42
    3843                $this->timeout_late_cron   = 0;
    3944                $this->timeout_missed_cron = - 5 * MINUTE_IN_SECONDS;
    4045