Skip to content

Restore fails for concatenated strings in WP_DEBUG_LOG #10

Closed

Description

@noplanman

As far as I can tell, the problem seems to be this line:

$value = trim( $value, '"\'' ); // Normalize quoted value.

My wp-config.php before:

define( 'WP_DEBUG_LOG', __DIR__ . '/../logs/wp-debug.log' );

After restore (note the missing end quote of the file path):

define( 'WP_DEBUG_LOG', __DIR__ . '/../logs/wp-debug.log );

Activity

  1. afragen commented on Nov 14, 2020

    @afragen
    Owner

    You're right, but I don't really have a solution to adding a file path to WP_DEBUG_LOG. I know it works but I'm trying to sanitize my inputs.

    May I suggest using ini_set( 'error_log', __DIR__ . '/../logs/wp-debug.log' ); instead.

  2. afragen commented on Nov 14, 2020

    @afragen
    Owner

    I'll see what I can do also.

  3. afragen commented on Nov 14, 2020

    @afragen
    Owner

    At this time I don't honestly know why I even added that line. Just comment it out. It will likely be commented out in the next release.

  4. noplanman commented on Nov 14, 2020

    @noplanman
    Author

    Was it maybe to prevent something like the quotes being saved in the string itself in some cases?

    You can close off here after some more testing and when it's in the next release, thanks 🙏

  5. afragen commented on Nov 17, 2020

    @afragen
    Owner

    Release v2.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions