• Resolved Monoloid

    (@monoloid)


    Hi, I’m getting this error. Any ideas?

    Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/ApiController.php:420
    Stack trace:
    #0 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/ApiController.php(420): array_keys(NULL)
    #1 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/ApiController.php(267): ShortPixel\Controller\ApiController->handleResponse(Object(stdClass), Array)
    #2 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/ApiController.php(123): ShortPixel\Controller\ApiController->doRequest(Object(stdClass), Array)
    #3 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(486): ShortPixel\Controller\ApiController->processMediaItem(Object(stdClass), Object(ShortPixel\Model\Image\MediaLibraryModel))
    #4 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(416): ShortPixel\Controller\OptimizeController->sendToProcessing(Object(stdClass), Object(ShortPixel\Controller\Queue\MediaLibraryQueue))
    #5 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(383): ShortPixel\Controller\OptimizeController->runTick(Object(ShortPixel\Controller\Queue\MediaLibraryQueue))
    #6 /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/AjaxController.php(155): ShortPixel\Controller\OptimizeController->processQueue(Array)
    #7 /var/www/1/161697/www/wp-includes/class-wp-hook.php(308): ShortPixel\Controller\AjaxController->ajax_processQueue('')
    #8 /var/www/1/161697/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #9 /var/www/1/161697/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #10 /var/www/1/161697/www/wp-admin/admin-ajax.php(188): do_action('wp_ajax_shortpi...')
    #11 {main}
      thrown in /var/www/1/161697/www/wp-content/plugins/shortpixel-image-optimiser/class/Controller/ApiController.php on line 420
     Last Item ID: 8656
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    Thank you for your message. We’re sorry to hear about this problem. 🙁

    In order to help you troubleshoot this, it would be helpful if you could provide us with some additional information, including:

    • Where exactly you are seeing this error, and what steps you followed to encounter it.
    • Your site information. Please navigate to Tools > Site Health > Info, click on the “Copy site info to clipboard” button and paste the information in your reply.
    • Screenshots of your ShortPixel plugin settings (ShortPixel Image Optimizer, ShortPixel Adaptive Images and/or Autoptimize).

    We look forward to working with you to resolve the issue.

    Best,

    Thread Starter Monoloid

    (@monoloid)

    Hi, the the error is shown on top at the ShortPixel settings.

    `
    ### wp-core ###
    
    version: 6.2
    site_language: nb_NO
    user_language: en_US
    timezone: Europe/Oslo
    permalink: /%year%/%monthnum%/%day%/%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: undefined
    environment_type: production
    user_count: 556
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /var/www/1/161697/www
    wordpress_size: 794,14 MB (832711445 bytes)
    uploads_path: /var/www/1/161697/www/wp-content/uploads
    uploads_size: 14,08 GB (15114300053 bytes)
    themes_path: /var/www/1/161697/www/wp-content/themes
    themes_size: 29,86 MB (31311826 bytes)
    plugins_path: /var/www/1/161697/www/wp-content/plugins
    plugins_size: 422,43 MB (442953455 bytes)
    database_size: 754,64 MB (791298048 bytes)
    total_size: 16,03 GB (17212574827 bytes)
    
    ### wp-dropins (2) ###
    
    advanced-cache.php: true
    object-cache.php: true
    
    ### wp-active-theme ###
    
    name: Avada (Avada)
    version: 7.10.1
    author: ThemeFusion
    author_website: https://themeforest.net/user/ThemeFusion
    parent_theme: none
    theme_features: core-block-patterns, fusion-builder-options, widgets-block-editor, post-thumbnails, title-tag, automatic-feed-links, custom-header, custom-background, woocommerce, wc-product-gallery-zoom, wc-product-gallery-slider, wc-product-gallery-lightbox, post-formats, fusion-builder-demos, menus, align-wide, wp-block-styles, editor-font-sizes, editor-color-palette, widgets
    theme_path: /var/www/1/161697/www/wp-content/themes/Avada
    auto_update: Disabled
    
    ### wp-themes-inactive (1) ###
    
    Twenty Nineteen: version: 2.5, author: the WordPress team, Auto-updates disabled
    
    ### wp-mu-plugins (1) ###
    
    ManageWP - Worker Loader: version: 1.0.0, author: GoDaddy
    
    ### wp-plugins-active (48) ###
    
    Advanced iFrame: version: 2023.1, author: Michael Dempfle, Auto-updates disabled
    All in One SEO: version: 4.3.7, author: All in One SEO Team, Auto-updates disabled
    APCu Manager: version: 3.5.2, author: Pierre Lannoy / PerfOps One, Auto-updates disabled
    Avada Builder: version: 3.10.1, author: ThemeFusion, Auto-updates disabled
    Avada Core: version: 5.10.1, author: ThemeFusion, Auto-updates disabled
    BackupSheep - Reliable Offsite Backups: version: 1.8, author: BackupSheep.Com, Bilal Ahmed, Auto-updates disabled
    Better Search Replace: version: 1.4.2, author: WP Engine, Auto-updates disabled
    Booster for WooCommerce: version: 6.0.5, author: Pluggabl LLC, Auto-updates disabled
    Brands for WooCommerce: version: 3.8.2.1, author: BeRocket, Auto-updates disabled
    Cart Lift - Abandoned Cart Recovery for WooCommerce and EDD: version: 3.1.6, author: RexTheme, Auto-updates disabled
    Cart Lift Pro: version: 2.1.1, author: RexTheme, Auto-updates disabled
    Classic Editor: version: 1.6.3, author: WordPress Contributors, Auto-updates disabled
    Classic Widgets: version: 0.3, author: WordPress Contributors, Auto-updates disabled
    Clean Image Filenames: version: 1.4, author: Upperdog, Auto-updates disabled
    Cloudflare: version: 4.11.0, author: Cloudflare, Inc., Auto-updates disabled
    Code Snippets: version: 3.3.0, author: Code Snippets Pro, Auto-updates disabled
    Continue Shopping From Cart Page: version: 1.3, author: Arrow Design, Auto-updates disabled
    Custom Order Statuses for WooCommerce: version: 1.5.2, author: Nuggethon, Auto-updates disabled
    Enable Media Replace: version: 4.1.2, author: ShortPixel, Auto-updates disabled
    Facebook for WooCommerce: version: 3.0.23, author: Facebook, Auto-updates disabled
    Google Analytics for WordPress by MonsterInsights: version: 8.14.1, author: MonsterInsights, Auto-updates disabled
    Hide Categories and Products for Woocommerce: version: 1.2.8, author: N.O.U.S. Open Useful and Simple, Auto-updates disabled
    Instantio - Instant Checkout for WooCommerce: version: 2.5.23, author: Themefic, Auto-updates disabled
    Instantio Pro: version: 2.5.6, author: Themefic, Auto-updates disabled
    iThemes Security: version: 8.1.6, author: iThemes, Auto-updates enabled
    Loco Translate: version: 2.6.4, author: Tim Whitlock, Auto-updates disabled
    MailPoet: version: 4.15.0, author: MailPoet, Auto-updates disabled
    MailPoet Premium: version: 4.15.0, author: MailPoet, Auto-updates disabled
    ManageWP - Worker: version: 4.9.17, author: GoDaddy, Auto-updates disabled
    Permalink Manager for WooCommerce: version: 1.0.8, author: BeRocket, Auto-updates disabled
    PixelYourSite: version: 9.3.7, author: PixelYourSite, Auto-updates disabled
    Poker Hands: version: 1.0.0, author: Muhammad Umer, Auto-updates disabled
    Redirection: version: 5.3.10, author: John Godley, Auto-updates disabled
    ShortPixel Image Optimizer: version: 5.2.2, author: ShortPixel - Convert WebP/AVIF & Optimize Images, Auto-updates disabled
    StopBadBots: version: 7.32, author: Bill Minozzi, Auto-updates disabled
    TablePress: version: 2.1.3, author: Tobias Bäthge, Auto-updates disabled
    UpdraftPlus - Backup/Restore: version: 1.23.3, author: UpdraftPlus.Com, DavidAnderson, Auto-updates disabled
    WooCommerce: version: 7.7.0, author: Automattic, Auto-updates disabled
    WooCommerce Google Analytics Integration: version: 1.8.1, author: WooCommerce, Auto-updates disabled
    WooCommerce QuickPay: version: 6.8.3, author: Perfect Solution, Auto-updates disabled
    WooCommerce Speed Drain Repair - WP Fix It: version: 2.0, author: WP Fix It, Auto-updates disabled
    WP-Optimize - Clean, Compress, Cache: version: 3.2.15, author: David Anderson, Ruhani Rabin, Team Updraft, Auto-updates disabled
    WPC Product Bundles for WooCommerce: version: 7.1.3, author: WPClever, Auto-updates disabled
    wpDataTables: version: 5.5, author: TMS-Plugins, Auto-updates disabled
    WP Mail SMTP: version: 3.8.0, author: WP Mail SMTP, Auto-updates disabled
    WP Rocket: version: 3.13.2, author: WP Media, Auto-updates disabled
    WP SVG Images: version: 4.2, author: ShortPixel, Auto-updates disabled
    Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
    
    ### wp-plugins-inactive (16) ###
    
    Advanced iFrame custom folder: version: 1.0, author: Michael Dempfle, Auto-updates disabled
    Crop Thumbnails: version: 1.6.0, author: Volkmar Kantor, Auto-updates disabled
    Google Listings and Ads: version: 2.4.5, author: WooCommerce, Auto-updates disabled
    Google Maps Widget PRO: version: 5.51, author: Web factory Ltd, Auto-updates disabled
    Hide from Search: version: 1.1.4, author: Micah Wood, Auto-updates disabled
    Pixel Tag Manager for WooCommerce (PTM) - Google Analytics, Google Ads and All Pixel In One Solution: version: 1.3.5, author: GrowCommerce, Auto-updates disabled
    Query Monitor: version: 3.12.2, author: John Blackbourn, Auto-updates disabled
    Rearrange Woocommerce Products: version: 4.1.2, author: Aslam Doctor, Auto-updates disabled
    Regenerate Thumbnails Advanced: version: 2.4.1, author: ShortPixel, Auto-updates disabled
    WooCommerce Google Ads Dynamic Remarketing: version: 1.8.2, author: SweetCode, Auto-updates disabled
    WP File Manager: version: 7.1.9, author: mndpsingh287, Auto-updates disabled
    WPForms Lite: version: 1.8.1.2, author: WPForms, Auto-updates disabled
    WP Memory: version: 2.54, author: Bill Minozzi, Auto-updates disabled
    WP Product Feed Manager: version: 1.49.1, author: Michel Jongbloed, Auto-updates disabled
    wptools: version: 3.53, author: Bill Minozzi, Auto-updates disabled
    YellowPencil: version: 7.5.9, author: WaspThemes, Auto-updates disabled
    
    ### code-snippets (3) ###
    
    snippet-6: name: Woocommerce ,- bak sum, scope: global, modified: 2022-02-16 23:21:39
    snippet-11: name: Auto update cart, scope: global, modified: 2023-03-15 19:09:28
    snippet-13: name: Lost password fix, scope: global, modified: 2023-03-17 20:13:27
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1673
    imagemagick_version: ImageMagick 6.8.9-9 Q16 x86_64 2023-03-28 http://www.imagemagick.org
    imagick_version: 3.4.4
    file_uploads: File uploads is turned off
    post_max_size: 512M
    upload_max_filesize: 128M
    max_effective_size: 128 MB
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 375 GB
    	imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    	imagick::RESOURCETYPE_FILE: 768
    	imagick::RESOURCETYPE_MAP: 375 GB
    	imagick::RESOURCETYPE_MEMORY: 188 GB
    	imagick::RESOURCETYPE_THREAD: 1
    	imagick::RESOURCETYPE_TIME: 1.844674407371E+19
    imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FITS, FRACTAL, FTS, G3, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, INFO, INLINE, IPL, ISOBRL, JBG, JBIG, JNG, JNX, JPEG, JPG, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: 2.3.0
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.26
    
    ### wp-server ###
    
    server_architecture: Linux 4.15.0-191-generic x86_64
    httpd_software: Apache/2.4.18 (Ubuntu)
    php_version: 8.0.5 64bit
    php_sapi: apache2handler
    max_input_variables: 3000
    time_limit: 180
    memory_limit: 512M
    max_input_time: -1
    upload_max_filesize: 128M
    php_post_max_size: 512M
    curl_version: 7.47.0 OpenSSL/1.0.2g
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.6.12-MariaDB-0ubuntu0.22.04.1-log
    client_version: mysqlnd 8.0.5
    max_allowed_packet: 268435456
    max_connections: 4096
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /var/www/1/161697/www/wp-content
    WP_PLUGIN_DIR: /var/www/1/161697/www/wp-content/plugins
    WP_MEMORY_LIMIT: 512M
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: true
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
    ### aioseo (1) ###
    
    noindexed: Author Archives, Search Page
    
    ### perfopsone_objectcache ###
    
    product: APCu
    directive_enabled: 1
    directive_shm_segments: 1
    directive_shm_size: 2048M
    directive_entries_hint: 4096
    directive_ttl: 0
    directive_gc_ttl: 3600
    directive_mmap_file_mask: undefined
    directive_slam_defense: 0
    directive_enable_cli: 0
    directive_use_request_time: 0
    directive_serializer: php
    directive_coredump_unmap: 0
    directive_preload_path: undefined
    status_num_seg: 1
    status_seg_size: 2147483528
    status_avail_mem: 2079347248
    status_num_slots: 4099
    status_ttl: undefined
    status_num_hits: 230907402
    status_num_misses: 53688660
    status_num_inserts: 5624597
    status_num_entries: 37559
    status_expunges: undefined
    status_start_time: 1681383343
    status_mem_size: 66871064
    status_memory_type: mmap
    
    ### perfopsone_opcache ###
    
    product: Zend OPcache 8.0.5
    directive_opcache.enable: true
    directive_opcache.enable_cli: false
    directive_opcache.use_cwd: true
    directive_opcache.validate_timestamps: true
    directive_opcache.validate_permission: false
    directive_opcache.validate_root: false
    directive_opcache.dups_fix: false
    directive_opcache.revalidate_path: false
    directive_opcache.log_verbosity_level: 1
    directive_opcache.memory_consumption: 134217728
    directive_opcache.interned_strings_buffer: 8
    directive_opcache.max_accelerated_files: 10000
    directive_opcache.max_wasted_percentage: 0.05
    directive_opcache.consistency_checks: undefined
    directive_opcache.force_restart_timeout: 180
    directive_opcache.revalidate_freq: 2
    directive_opcache.preferred_memory_model: undefined
    directive_opcache.blacklist_filename: undefined
    directive_opcache.max_file_size: undefined
    directive_opcache.error_log: undefined
    directive_opcache.protect_memory: false
    directive_opcache.save_comments: true
    directive_opcache.record_warnings: false
    directive_opcache.enable_file_override: false
    directive_opcache.optimization_level: 2147401727
    directive_opcache.lockfile_path: /tmp
    directive_opcache.file_cache: undefined
    directive_opcache.file_cache_only: false
    directive_opcache.file_cache_consistency_checks: true
    directive_opcache.file_update_protection: 2
    directive_opcache.opt_debug_level: undefined
    directive_opcache.restrict_api: undefined
    directive_opcache.huge_code_pages: false
    directive_opcache.preload: undefined
    directive_opcache.preload_user: undefined
    directive_opcache.jit: tracing
    directive_opcache.jit_buffer_size: undefined
    directive_opcache.jit_debug: undefined
    directive_opcache.jit_bisect_limit: undefined
    directive_opcache.jit_blacklist_root_trace: 16
    directive_opcache.jit_blacklist_side_trace: 8
    directive_opcache.jit_hot_func: 127
    directive_opcache.jit_hot_loop: 64
    directive_opcache.jit_hot_return: 8
    directive_opcache.jit_hot_side_exit: 8
    directive_opcache.jit_max_exit_counters: 8192
    directive_opcache.jit_max_loop_unrolls: 8
    directive_opcache.jit_max_polymorphic_calls: 2
    directive_opcache.jit_max_recursive_calls: 2
    directive_opcache.jit_max_recursive_returns: 2
    directive_opcache.jit_max_root_traces: 1024
    directive_opcache.jit_max_side_traces: 128
    directive_opcache.jit_prof_threshold: undefined
    status_opcache_enabled: true
    status_cache_full: true
    status_restart_pending: false
    status_restart_in_progress: false
    status_used_memory: 6291000
    status_free_memory: 8
    status_wasted_memory: 2890240
    status_current_wasted_percentage: 2.1533966064453
    status_buffer_size: undefined
    status_number_of_strings: 95822
    status_num_cached_scripts: 4203
    status_num_cached_keys: 5774
    status_max_cached_keys: 16229
    status_hits: 237773310
    status_start_time: 1681383343
    status_last_restart_time: 1683813720
    status_oom_restarts: 13
    status_hash_restarts: undefined
    status_manual_restarts: undefined
    status_misses: 8869142
    status_blacklist_misses: undefined
    status_blacklist_miss_ratio: undefined
    status_opcache_hit_rate: 96.404048886118
    status_enabled: false
    status_on: false
    status_kind: 5
    status_opt_level: 4
    status_opt_flags: 6
    status_buffer_free: undefined
    
    ### apcu-manager ###
    
    forceearlyloading: 1
    earlyloading: 1
    compat: 1
    version: 3.5.2
    use_cdn: undefined
    use_apcu: 1
    script_in_footer: undefined
    display_nag: undefined
    analytics: 1
    history: 21
    gc: 1
    metrics: undefined
    adminbar: 1
    
    ### wp_mail_smtp ###
    
    version: 3.8.0
    license_key_type: lite
    debug: No debug notices found.
    lite_install_date: Apr 4, 2022 @ 1:15am
    
    `

    Settings:
    https://www.dropbox.com/s/d2arhlnejdbjpo5/shortpixel.png?dl=0

    Thank you, Monoloid!

    We are already working on fixing that, so we will get back to you if needed 🙂

    Best,

    Plugin Author Pedro

    (@petredobrescu)

    Hello @monoloid,

    After checking the error and the details you provided, it looks like you have in the optimizing queue some very old items/images (probably left there somehow from 2022, or you used an older version of the plugin until recently). We have changed the way the requests are done to the optimization API and this is why you get that fatal error. We’ll include a fix for this error in the upcoming version 5.2.3.

    Meanwhile, the quick solution for this issue is this:

    • Clear the existing queue by going to Settings -> ShortPixel -> Tools tab -> Clear the Queue
    • Start the Bulk Processing again from Media Library -> Bulk ShortPixel

    After the queue is cleared this error should no longer show up.

    I would appreciate if you could confirm that the above solution works in your case! Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Uncaught TypeError’ is closed to new replies.