[PR #1468] [CLOSED] fix(other): preg_match(): Passing null to parameter # deprecated warning #1538

Closed
opened 2026-02-25 21:38:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/1468
Author: @IrAlfred
Created: 3/10/2025
Status: Closed

Base: masterHead: fix-preg_match-null-param-deprecated


📝 Commits (1)

  • 950afd4 fix(other): Fix preg_match(): Passing null to parameter # is deprecated

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 lib/request.php (+1 -1)

📄 Description

Issue

Running php console.php sieve:filters in Tiki results in the following deprecation warning from Cypht integration:

preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated 
on line 179 of /var/www/html/tiki27x/vendor_bundled/vendor/jason-munro/cypht/lib/request.php

This occurs because $this->server['HTTP_USER_AGENT'] is null, and preg_match() requires a string, causing a deprecation warning.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/1468 **Author:** [@IrAlfred](https://github.com/IrAlfred) **Created:** 3/10/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-preg_match-null-param-deprecated` --- ### 📝 Commits (1) - [`950afd4`](https://github.com/cypht-org/cypht/commit/950afd4b617641df0738dca5c6c1c44de818ab99) fix(other): Fix preg_match(): Passing null to parameter # is deprecated ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/request.php` (+1 -1) </details> ### 📄 Description ### Issue Running `php console.php sieve:filters` in **Tiki** results in the following deprecation warning from **Cypht integration**: ``` preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated on line 179 of /var/www/html/tiki27x/vendor_bundled/vendor/jason-munro/cypht/lib/request.php ``` This occurs because `$this->server['HTTP_USER_AGENT']` is `null`, and `preg_match()` requires a **string**, causing a deprecation warning. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:38:35 +03:00
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/cypht#1538
No description provided.