Using Embedded Media Thumbnail with any version of PHP prior to 5.1.2 will generate errors when accessing thumbnails.

This is because on lines 587 and 588 of emthumb.module, the PHP_URL_PATH component is being passed as the second argument to parse_url():

  $file->filename = parse_url($basename, PHP_URL_PATH);
  $file->filepath = parse_url($filepath, PHP_URL_PATH);

The second "component" argument to parse_url() was not added until PHP 5.1.2. This module should either be marked as requiring PHP 5, or be updated to not use the "component" argument to parse_url(). For example, the following code should make the module compatible with older versions of PHP.

        $basename_arr = parse_url($basename);
        $filepath_arr = parse_url($filepath);
        $file->filename = $basename_arr['path'];        
        $file->filepath = $filepath_arr['path'];
CommentFileSizeAuthor
#1 539940.patch969 bytesrobloach

Comments

robloach’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new969 bytes
aaron’s picture

Status: Needs review » Fixed

awesome, thanks! committed now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.