Odd entry in lc_orders_items.options

Usually, lc_orders_items.options contains 
a:0:{}
when there are no options.  But sometimes it contains:
s:0:"";
What could cause the difference?

tim

These are both PHP serialized variables. One says an empty array, the other an empty string. That is what was set to the order item option.

But what would cause the difference?  In both cases there are no options on the products ordered.

tim

To answer that I would need to reverse engineer all code that sets items in the order entity. Is this a problem?

No, not for LiteCart.  It was when I first imported it into my FileMaker db, but I worked around it.  I was just curious as to why there should be a difference.  It just seems that if a product has no options, the value of that field should always be the same.

Here is a fix:
Nice fix!  I keep forgetting that isset() and !empty() return different results. :\

I am migrating serialized PHP variables into JSON with the release of 2.3.
That sounds like a good choice.  Besides options, what other fields (pertaining to orders) will be affected by this change?  I'll need to update those calcs in my FileMaker db, as well.

tim

You will be able to tell by the upgrade patches once the day come.

This thread has been closed due to long inactivity. Posting to it is not possible.
View code on GitHub