• JeSyme

    (@jesyme)


    non MU – WAMP – 100% working WP site for 2 years now.
    Install new copy of DY Rotator into WP, activate the plugin, attempt to ‘upload a photo’ – Upload – and I get this error message:

    Warning: basename() expects parameter 1 to be string, object given in X:\Websites\wp-content\plugins\dj-rotator-for-wordpress\dj-rotator-for-wordpress.php on line 159

    Warning: file_exists() expects parameter 1 to be string, object given in X:\Websites\wp-includes\media.php on line 250

    Catchable fatal error: Object of class WP_Error could not be converted to string in X:\Websites\wp-includes\media.php on line 251

    ——————–
    Simply adding a picture too small gives me:
    Sorry, but this image does not meet the minimum height/width requirements. Please upload another image
    in a pink bar at the top.
    ———————

    Actual file: media.php line 250 and 251 are as follows:

    if ( ! file_exists( $file ) )
    return sprintf(__(‘File “%s” doesn’t exist?’), $file);

    Actual file: dj-rotator-for-wordpress.php
    // if the image is larger than the width/height requirements, then scale it down.
    if($width > $djwp_settings[‘img_width’] || $height > $djwp_settings[‘img_height’]) {
    // resize the image
    $resized = image_resize($file, $djwp_settings[‘img_width’], $djwp_settings[‘img_height’], true, ‘resized’);
    $resized_url = $upload_dir_url . basename($resized);
    // delete the original
    unlink($file);
    $file = $resized;
    $url = $resized_url;

    so I try a brand new picture 100×100. results:
    Warning: basename() expects parameter 1 to be string, object given in X:\Websites\wp-content\plugins\dj-rotator-for-wordpress\dj-rotator-for-wordpress.php on line 159

    Warning: file_exists() expects parameter 1 to be string, object given in X:\Websites\wp-includes\media.php on line 250

    Catchable fatal error: Object of class WP_Error could not be converted to string in X:\Websites\wp-includes\media.php on line 251

    http://wordpress.org/extend/plugins/dj-rotator-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • patsky

    (@patsky)

    I’ve suddenly started getting this error after successfully loading some presenters a few days ago:

    Warning: basename() expects parameter 1 to be string, object given in /…/plugins/dj-rotator-for-wordpress/dj-rotator-for-wordpress.php on line 170

    but have found that it does upload the picture. If I click update on one of the existing presenters then the picture shows and I can add the other details. Wondering if another plugin is interfering with it but so far haven’t managed to find the cause.

    Thread Starter JeSyme

    (@jesyme)

    The same thing is happening on WP3.4.1 DJ version 0.0.6

    If there is another file to show please advise.
    The errors seem to be NON-dependent on the theme.
    i.e. the errors continue no matter what theme is running.

    If a workaround is to not allow the plugin to re-size, I can just hard set the photo to a specific dimension. let me know…

    I really want to use this plugin.

    -J

    Thread Starter JeSyme

    (@jesyme)

    more information: 100x100test.png also fails with this error:

    Warning: basename() expects parameter 1 to be string, object given in C:\Websites\wp-content\plugins\dj-rotator-for-wordpress\dj-rotator-for-wordpress.php on line 159

    Warning: file_exists() expects parameter 1 to be string, object given in C:\Websites\wp-includes\media.php on line 250

    Catchable fatal error: Object of class WP_Error could not be converted to string in C:\Websites\wp-includes\media.php on line 251

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: DJ Rotator For WordPress] Adding 1st picture’ is closed to new replies.