We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29606
    • 63 Posts
    Hi !
    During my tests with Revolution, I noticed I received a lot of warnings "unserialize() [<a href=’function.unserialize’>function.unserialize</a>]: Error at offset 0 of 4 bytes"
    I searched how to solve this, and found in file : core/xpdo/om/xpdoobject.class.php the following minor bug :
    (in Alpha-6 line 959, in Alpha-5 line 947 - can’t say for others)
                                    $value= unserialize($value);
    

    Whereas it should be
    								if ($value!='NULL') $value= unserialize($value);
    								else $value=array();
    

    as on every page load, the get method analyse an ’headers’ object whose content is ’NULL’ (the text string), and is of type array.

    This is a minor bug as if you don’t get the warnings, it’s completely invisible for the user. But it was overloading my error log for another part !
    • The real error here is that the string NULL was written to the database as a value, whereas it should be an actual null (both in MySQL and PHP). I think this has already been addressed, but if you have been upgrading existing installs it could be just a residual problem with the existing data. I’ll look into it more this week to make sure that is the case...
        • 29606
        • 63 Posts
        This happens on an "fresh" Alpha-5 installation, no migration.
        It occurs on every page, as far as I can tell.
        • Quote from: Thalion at Dec 08, 2008, 05:29 PM

          This happens on an "fresh" Alpha-5 installation, no migration.
          It occurs on every page, as far as I can tell.
          We’re way passed alpha-5 at this point and a lot has changed, so...