The MU forums have moved to WordPress.org

Bug found and solved, what now? (5 posts)

  1. rufford
    Inactive
    Posted 17 years ago #

    I was getting several bugs on almost every action of WPMU. I'm thinking it is an issue with the setup or version of the PHP I use. (5.0.4) However, I found a simple solution that can be repeated for each action.

    wp-inst/wp-admin/post.php
    Line 8:
    if (empty($_POST["$wpvar"])) {
    Change To:
    if (empty($_POST["$wpvar"]) || $$wpvar == '') {

    This line is used within a loop that defines PHP variables with POSTed data. In this case, a switch on $action follows shortly and $action was previously set as blank. $action is never defined as the $_POST['action'] as it should be and the switch defaults.

    Since I think its a problem with my PHP version or an oddity in my setup I'll post a link to a phpinfo page.
    http://russell.v7studios.com/phpinfo.php

    Will this modification have any adverse affects besides redefining some variables that should be blank? Perhaps using $$wpvar === '' would be in order. Also, is there a better place to submit code for use in WPMU? The code is used in several places and I'd not want to go through every file that has it after every update. I can give you a list of list of the files and the line numbers that should be modified.

    Thanks!

  2. rufford
    Inactive
    Posted 17 years ago #

    I'll add that I'll be working with WPMU for a while and might have other code contributions I can make. I'd also like to know if there is a better solution.

  3. rufford
    Inactive
    Posted 17 years ago #

    I'll add that I'll be working with WPMU for a while and might have other code contributions I can make. I'd also like to know if there is a better solution.

  4. rufford
    Inactive
    Posted 17 years ago #

    I'll add that I'll be working with WPMU for a while and might have other code contributions I can make. I'd also like to know if there is a better solution.

  5. techwench
    Inactive
    Posted 16 years ago #

    Deja vu... ;)

About this Topic

  • Started 17 years ago by rufford
  • Latest reply from techwench