You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command should list the sites within the specified organization without triggering any PHP deprecation warnings.
Actual behavior
The command executed triggers a PHP deprecation warning related to the str_replace() function in the TsvFormatter.php file. The warning message is as follows:
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in phar:///usr/local/Cellar/terminus/3.5.2/bin/terminus/vendor/consolidation/output-formatters/src/Formatters/TsvFormatter.php on line 36
This deprecation warning occurs when the str_replace() function is called with a null value, which is deprecated in PHP 8.1.
I've tried switching to different formats like json and csv, but the issue persists when using the tsv format. It would be helpful if the TsvFormatter checked for null values before calling str_replace() to avoid this warning.
Suggestion for Patch
A potential patch for the TsvFormatter.php file would involve adding a check to ensure that the str_replace() function is not passed a null value. For example:
if (!is_null($subject)) {
$result = str_replace($search, $replace, $subject);
} else {
$result = $subject; // or provide a default value if appropriate
}
This change would prevent the deprecation warning by ensuring that str_replace() only operates on valid strings.
Please let me know if there's any additional information I can provide or if there's a workaround to suppress these warnings.
The text was updated successfully, but these errors were encountered:
MacOS
Homebrew
8.1
3.5.2
Command Executed
Expected behavior
The command should list the sites within the specified organization without triggering any PHP deprecation warnings.
Actual behavior
The command executed triggers a PHP deprecation warning related to the
str_replace()
function in theTsvFormatter.php
file. The warning message is as follows:This deprecation warning occurs when the
str_replace()
function is called with anull
value, which is deprecated in PHP 8.1.I've tried switching to different formats like
json
andcsv
, but the issue persists when using thetsv
format. It would be helpful if theTsvFormatter
checked fornull
values before callingstr_replace()
to avoid this warning.Suggestion for Patch
A potential patch for the
TsvFormatter.php
file would involve adding a check to ensure that thestr_replace()
function is not passed anull
value. For example:This change would prevent the deprecation warning by ensuring that
str_replace()
only operates on valid strings.Please let me know if there's any additional information I can provide or if there's a workaround to suppress these warnings.
The text was updated successfully, but these errors were encountered: