• Hello everybody,

    These are the warnings that I get when uploading a image to a post using the Yapb-Plugin.

    Warning: filesize(): stat failed for /tmp/phpCAirFq in /homepages/43/d96865821/htdocs/wordpress/wp-admin/includes/file.php on line 283
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/43/d96865821/htdocs/wordpress/wp-admin/includes/file.php:283) in /homepages/43/d96865821/htdocs/wordpress/wp-admin/post.php on line 233
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/43/d96865821/htdocs/wordpress/wp-admin/includes/file.php:283) in /homepages/43/d96865821/htdocs/wordpress/wp-includes/pluggable.php on line 1173

    I’ve recently updated to 4.0 and migrated to php 5.4 from 5.2. Since then I get the warnings.
    The strange thing is, when I go back to the post with the “Previous”-Button of my browser, the image appears and everything seems to work fine.

    Do you guys have any idea?
    Thanx,
    Claudi

    https://wordpress.org/plugins/yet-another-photoblog/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter claudi.fa

    (@claudifa)

    Anyone out there who’s got the same problem?

    Only since WordPress 4.0 there is line 283 which says …

    $test_file_size = 'wp_handle_upload' === $action ? $file['size'] : filesize( $file['tmp_name'] );

    So I suppose this issue occurs for anybody else who uses the “Yet Another Photoblog”-Plugin as well as WordPress 4.0.

    Cant’t get it fixed by myself. Any help is much appreciated.
    Thank you,
    Claudi

    I get the same errors with WordPress 4.0.

    There is definitely a problem with the way YAPB implements wp_handle_upload vs. the changes made to that function in WordPress 4.0. This function begins at line 190 in WP’s wp-admin/includes/file.php

    YAPB implements wp_handle_upload in /lib/Yapb.class.php, line 323. I have tried adding an override for this test (as described in file.php, line 264), by adding

    $overrides[‘test_size’] = false,

    to /lib/Yapb.class.php, line 323. This gets rid of the error message, but the consequence is that the image isn’t uploaded at all!

    And really, that’s not the right solution anyway, even if it worked. The correct thing to do is to figure out why WP’s file.php thinks that YAPB uploads are failing the file size test, and fix that issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warnings when uploading images after WordPress 4.0 update and php5.4 migration’ is closed to new replies.