[wp-trac] [WordPress Trac] #39165: Add page to assist with debugging and support

WordPress Trac noreply at wordpress.org
Fri Mar 2 11:45:22 UTC 2018


#39165: Add page to assist with debugging and support
-----------------------------------+-----------------------
 Reporter:  jorbin                 |       Owner:  Clorith
     Type:  task (blessed)         |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.0
Component:  Administration         |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  ui-feedback has-patch  |     Focuses:
-----------------------------------+-----------------------

Comment (by birgire):

 The ''Imagick Resource Limits'' field doesn't fit here because only scalar
 field values are supported:


 {{{
 // If Imagick is used as our editor, provide some more information about
 its limitations.
 if ( 'WP_Image_Editor_Imagick' === _wp_image_editor_choose() && isset(
 $imagick ) && $imagick instanceof Imagick ) {
         $limits = array(
                 'area'   => ( defined( 'imagick::RESOURCETYPE_AREA' ) ?
 size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_AREA ) ) :
 'Not Available' ),
                 'disk'   => ( defined( 'imagick::RESOURCETYPE_DISK' ) ?
 $imagick->getResourceLimit( imagick::RESOURCETYPE_DISK ) : 'Not Available'
 ),
                 'file'   => ( defined( 'imagick::RESOURCETYPE_FILE' ) ?
 $imagick->getResourceLimit( imagick::RESOURCETYPE_FILE ) : 'Not Available'
 ),
                 'map'    => ( defined( 'imagick::RESOURCETYPE_MAP' ) ?
 size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MAP ) ) :
 'Not Available' ),
                 'memory' => ( defined( 'imagick::RESOURCETYPE_MEMORY' ) ?
 size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MEMORY ) )
 : 'Not Available' ),
                 'thread' => ( defined( 'imagick::RESOURCETYPE_THREAD' ) ?
 $imagick->getResourceLimit( imagick::RESOURCETYPE_THREAD ) : 'Not
 Available' )
         );

         $info['wp-media']['fields'][] = array(
                 'label' => __( 'Imagick Resource Limits' ),
                 'value' => $limits
         );
 }

 }}}

 This results in PHP notices: "Array to string conversion".

 {{{'Not Available'}}} is also currently not translatable.

 We would need a new line for each value here, but then I wonder if it is
 getting to much space, compared to other debug fields. So I removed it
 from the patch, in the meanwhile.

 The patch [attachment:39165.12.diff]:

 - Fixes 134 Coding Standard issues.
 - Removes the ''Imagick Resource Limits'' field, while it doesn't fit the
 current field value setup.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39165#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list