Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #59712, comment 7


Ignore:
Timestamp:
04/11/2024 03:11:42 PM (2 years ago)
Author:
afragen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59712, comment 7

    v1 v2  
    1 In testing the PR does function correctly but I found a possible flaw. If `$args['source']` is a string and has leading or trailing spaces it passes the PR check, however, it fails the following line 566
     1In testing the PR does function correctly but I found a possible flaw. If `$args['source']` is a string and has leading or trailing spaces it passes the PR check, however, it fails the following line 566. I don’t even know if this edge case is possible. If not then the PR tests out fine.
    22
    33{{{
    44$source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
    55}}}
    6 
    7 It would seem before assigning `$args['source']` to `$source` we should run `trim( $args['source'] )`
    8 
    9 I expect the same should go for `$args['destination']`
    10 
    11 I don’t even know if this edge case is possible. If not then the PR tests out fine.
    12 
    13 I'm not sure in how many places this should happen. It is a curious edge case but it seems that's what we're testing.