Make WordPress Core

Ticket #8331: strip-only-whitespace.diff

File strip-only-whitespace.diff, 425 bytes (added by ydekproductions, 17 years ago)

This fixes it. It is stripping all whitecharacters in the returned $data stream is that is the only thing contained in the stream. Doesn't appear to break anything.

  • includes/class-wp-filesystem-ssh2.php

     
    167167                        } elseif (($returnbool) && (! (int) $data )) {
    168168                                return false;
    169169                        } else {
    170                                 return $data;
     170                                return preg_replace('/^\s$/', '', $data);
    171171                        }
    172172                }
    173173                return false;