Results 1 to 10 of 1681

Hybrid View

  1. #1

    Default Re: Dynamic Price Updater

    Any updates on the
    [20-Apr-2014 09:58:00 UTC] PHP Warning: reset() expects parameter 1 to be array, null given in /var/xxxxx/includes/classes/dynamic_price_updater.php on line 175
    [20-Apr-2014 09:58:00 UTC] PHP Warning: Variable passed to each() is not an array or object in /var/xxxxx/httpdocs/includes/classes/dynamic_price_updater.php on line 176

    ??
    See it all the time in my error logs.

  2. #2
    Join Date
    Jul 2005
    Location
    Wales, UK
    Posts
    382
    Plugin Contributions
    1

    Default Re: Dynamic Price Updater

    Hi all

    I do apologise for my time away from supporting the Updater... I've been called back in to solve this issue with the error message logging... I hadn't been paying attention to the thread (work has taken the place where I once had a life)

    As soon as I have a solution I will update the thread

    Cheers

    Dan

  3. #3
    Join Date
    Jul 2005
    Location
    Wales, UK
    Posts
    382
    Plugin Contributions
    1

    Default Re: Dynamic Price Updater

    Hi all

    I'm having some issues building a test environment, but I think I can fix this without it... Could I ask for volunteers?

    Dan

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Chrome View Post
    Hi all

    I'm having some issues building a test environment, but I think I can fix this without it... Could I ask for volunteers?

    Dan
    Here's one

  5. #5
    Join Date
    Jul 2005
    Location
    Wales, UK
    Posts
    382
    Plugin Contributions
    1

    Default Re: Dynamic Price Updater

    Hi Design75

    Sorry the time taken to respond; I decided to rewrite the fix... I'll also resubmit for verification after testing

    File is attached

    Thanks!

    Dan
    Attached Files Attached Files

  6. #6
    Join Date
    Jul 2005
    Location
    Wales, UK
    Posts
    382
    Plugin Contributions
    1

    Have a Drink Re: Dynamic Price Updater

    Hi all

    I've added a few changes to the Updater's class file... Here are the changes:

    - Changed the way the sidebox switch works (more a cosmetic/elegance alteration than anything, really)

    - Fixed the errors caused by the reset() and each() calls (I hope)... This error was my making

    - Altered the error logging method... Here I owe Design75 an apology as I incorrectly thought it was an example of bad design, but rather it's (I think) throwError() might be a magic function that's called in the event of any error in the class, rather than explicitly... It took me a while to figure out quite why the files were being created... After I figured this out I realised Design75's intention to alert the user to any error that had happened... I've added a drink icon as a peace offering to Design75 and my unreserved apologies... I'm sorry I reacted without fully checking and considering the situation... The logger now creates a single file in the logs folder and appends errors there

    All that said, I've attached a replacement file for anyone that's kind enough to test it for me... The file only contains the affected class in its folder structure... Here's what needs to be tested:

    - The _runDeep var that switches the sidebox on and off... This var is set in the class constructor

    - The noted errors about reset() and each() to make sure they're squashed

    - The new error logger... Easiest test is to manually call the logger directly, e.g. $this->throwError("Test error logger"); in the constructor

    - The _runSilent flag that controls whether errors should be logged... Check that the log file is being created and it's in the correct place... Run the error test several times to ensure content is appending and not overwriting (this shouldn't be a problem)... Var is set in the constructor

    All changes are commented but if anyone has any questions, please feel free to post here

    Many thanks to everyone that tests and, again, my sincere apologies to Design75 (I really don't know where my head was)

    Cheers

    Dan
    Attached Files Attached Files

  7. #7
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Chrome View Post
    Hi all

    I've added a few changes to the Updater's class file... Here are the changes:

    - Changed the way the sidebox switch works (more a cosmetic/elegance alteration than anything, really)

    - Fixed the errors caused by the reset() and each() calls (I hope)... This error was my making

    - Altered the error logging method... Here I owe Design75 an apology as I incorrectly thought it was an example of bad design, but rather it's (I think) throwError() might be a magic function that's called in the event of any error in the class, rather than explicitly... It took me a while to figure out quite why the files were being created... After I figured this out I realised Design75's intention to alert the user to any error that had happened... I've added a drink icon as a peace offering to Design75 and my unreserved apologies... I'm sorry I reacted without fully checking and considering the situation... The logger now creates a single file in the logs folder and appends errors there

    All that said, I've attached a replacement file for anyone that's kind enough to test it for me... The file only contains the affected class in its folder structure... Here's what needs to be tested:

    - The _runDeep var that switches the sidebox on and off... This var is set in the class constructor

    - The noted errors about reset() and each() to make sure they're squashed

    - The new error logger... Easiest test is to manually call the logger directly, e.g. $this->throwError("Test error logger"); in the constructor

    - The _runSilent flag that controls whether errors should be logged... Check that the log file is being created and it's in the correct place... Run the error test several times to ensure content is appending and not overwriting (this shouldn't be a problem)... Var is set in the constructor

    All changes are commented but if anyone has any questions, please feel free to post here

    Many thanks to everyone that tests and, again, my sincere apologies to Design75 (I really don't know where my head was)

    Cheers

    Dan

    No apologies needed. We al have our bad day, and you thought you were doing the right thing. I really appreciate you are back here and trying to make this module better.

 

 

Similar Threads

  1. v151 Help with dynamic price updater
    By anderson6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Jul 2014, 08:52 AM
  2. v139h Dynamic Price Updater 3.0 Help!
    By Newbie 2011 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Mar 2014, 06:46 AM
  3. Dynamic Price Updater Error
    By Inxie in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2012, 06:19 PM
  4. Alternative to Dynamic Price Updater?
    By thebigkick in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2012, 11:41 PM
  5. Dynamic Price Updater with href
    By maxell6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Mar 2012, 12:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR