[GH-ISSUE #1435] Quotation error ( ` ) #603

Closed
opened 2026-03-04 02:16:19 +03:00 by kerem · 3 comments
Owner

Originally created by @rickserrat on GitHub (Mar 6, 2020).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1435

Monolog version 1|2

Error:
NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: preg_match() expects parameter 2 to be string, null given in /var/www/html/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:54

Remove:

$branches = `git branch -v --no-abbrev`;

Update: $branches = 'git branch -v --no-abbrev';

Originally created by @rickserrat on GitHub (Mar 6, 2020). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1435 Monolog version 1|2 Error: NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: preg_match() expects parameter 2 to be string, null given in /var/www/html/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:54 Remove: > ```$branches = `git branch -v --no-abbrev`;``` **Update:**` $branches = 'git branch -v --no-abbrev';`
kerem 2026-03-04 02:16:19 +03:00
  • closed this issue
  • added the
    Bug
    label
Author
Owner

@rickserrat commented on GitHub (Mar 11, 2020):

@Seldaek Can I make a pull request?

<!-- gh-comment-id:597674655 --> @rickserrat commented on GitHub (Mar 11, 2020): @Seldaek Can I make a pull request?
Author
Owner

@Seldaek commented on GitHub (Mar 11, 2020):

This is not a quotation error, the backticks are executing the process https://www.php.net/manual/en/language.operators.execution.php. But I guess it should check that $branches is not null before calling preg_match. Feel free to PR that to 1.x branch.

<!-- gh-comment-id:597675749 --> @Seldaek commented on GitHub (Mar 11, 2020): This is not a quotation error, the backticks are executing the process https://www.php.net/manual/en/language.operators.execution.php. But I guess it should check that $branches is not null before calling preg_match. Feel free to PR that to 1.x branch.
Author
Owner

@rickserrat commented on GitHub (Mar 13, 2020):

Pull Request 1.x #1438

<!-- gh-comment-id:598748240 --> @rickserrat commented on GitHub (Mar 13, 2020): Pull Request 1.x #1438
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#603
No description provided.