Jump to content

Suggestion: Make sure an expected array is actually an array/check for expected tables/columns.


Wolfie

Recommended Posts

During my upgrade from 3.4.6 to 4.7.11 (Slurpee time), I experienced a few issues.

I encountered this same issue that @teraßyte provided a fix for.

So when an array is expected, a similar thing should be done (when acceptable) so that if there isn't an array, one can be made.  If an array is required, as in there has to be some sort of data for the process to continue properly, then obviously an error should happen but should be a friendly error that explains the problem enough to know that a workaround isn't a recommended solution.

 

I also encountered situations where a table or row was expected but missing.  Somewhere in the upgrade process, the tables/columns were assumed to have been created, which may be the case when upgrading from a more recent version but not from an older version.  I think instead of checking for them, there is perhaps a version in the upgrade process that is skipping the part of adding the expected tables/columns when that version of the install adds them.

 

 

Edited by Wolfie
Link to comment
Share on other sites

The main issue is that some of the old upgrade steps aren't compatible with PHP 8. With PHP 7 they simply failed silently.

 

When upgrading from 3.x, I usually upgrade to 4.7.3 using PHP 7.4, and then I upgrade to the latest version available after switching to PHP 8.x. It saves a lot of trouble. 😅

Link to comment
Share on other sites

21 minutes ago, teraßyte said:

When upgrading from 3.x, I usually upgrade to 4.7.3 using PHP 7.4, and then I upgrade to the latest version available after switching to PHP 8.x. It saves a lot of trouble. 😅

Why didn't you tell me this before I decided to quietly upgrade? 😁

Link to comment
Share on other sites

This is another good reason to keep up to date. Many of those upgrade steps you've had to run were written 10 years ago and as @teraßyte mentions, may not be fully compatible with PHP 8 or some areas of the framework they use have drastically changed over time.

I do have an issue open tracking some 3.4 upgrade issues based on previous feedback from @teraßyte and we'll try to address those where we can but please keep up to date with releases going foward.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...