I'm trying to get all my modules up to date so I can update to the latest version of Drupal 5 so that I can ultimately update to Drupal 6.

I am currently using Drupal 5.15 . While updating the textimage module from 5.x-2.0 to 5.x-2.1, I get the following error message when running update.php:

Fatal error: Cannot use object of type stdClass as array in /home//
/textimage/textimage.install on line 162

when I go to the next page, I get this error:

user warning: Table 'textimage_image' already exists query: CREATE TABLE textimage_image ( pid INT UNSIGNED NOT NULL DEFAULT 0, file VARCHAR(255) NOT NULL PRIMARY KEY, data TEXT NOT NULL) /*!40100 DEFAULT CHARACTER SET utf8 */ in /home//
/database.mysql.inc on line 174.

The overall result is that while the slot for textimage in the available updates list becomes green, I am not able to run update.php, and thus, update the database.

For the time being, I have reverted to the older version. What should I do to make the update work?

Thanks

Comments

Deciphered’s picture

Hi Cntrld_cHaOs,

I will see if I can reproduce this issue shortly.

Cheers,
Deciphered.

Deciphered’s picture

Hi Cntrld_cHaOs,

Sorry for the delay, just had a look at the issue and have discovered the issue.
Simple fix:

Change line 162 of textimage.install from:

    $path = realpath(file_directory_path() .'/textimage/'. $preset['name']);

To:

    $path = realpath(file_directory_path() .'/textimage/'. $preset->name);

You will also need to re-run the update.php.

Will commit fix ASAP.

Cheers,
Deciphered.

Deciphered’s picture

Status: Active » Fixed

Fixed and committed to HEAD, DRUPAL-6--2 and DRUPAL-5--2.

Cheers,
Deciphered.

Cntrld_cHaOs’s picture

Hey,

Many thanks for the speedy response. I am going to attempt this again this weekend. Will keep you posted.

Deciphered’s picture

No problems.

Just be sure to use the latest dev build, because that's where the fix is.

Cheers,
Deciphered.

Cntrld_cHaOs’s picture

Hey,

It worked!

Thanks!

Deciphered’s picture

Status: Fixed » Closed (fixed)

That's great to hear :)