CMS MADE SIMPLE FORGE

SnippetMgr

 

[#12760] Silence PHP 8.0 warnings from class.UserDefinedTagsOperations.php

avatar
Created By: Scott R. Godin (WebDragon)
Date Submitted: Fri Oct 11 14:56:24 -0400 2024

Assigned To:
Version: 1.4.3
CMSMS Version: 2.2.21
Severity: Minor
Resolution: None
State: Open
Summary:
Silence PHP 8.0 warnings from class.UserDefinedTagsOperations.php
Detailed Description:
[10-Oct-2024 14:33:09 America/New_York] PHP Deprecated:  Required parameter
$alias follows optional parameter $id in
/home/stephens/public_html/devel/modules/SnippetMgr/lib/class.UserDefinedTagsOperations.php
on line 244

along the principle of 'change the least amount of things' patch follows:
---

--- www/modules/SnippetMgr/lib/class.UserDefinedTagsOperations.php     
2020-03-11 13:53:30.000000000 -0400
+++ www/devel/modules/SnippetMgr/lib/class.UserDefinedTagsOperations.php       
2024-10-10 14:42:14.070000000 -0400
@@ -241,7 +241,7 @@
    *
    * @return bool
    */
-  function UpdateUserTag($id = NULL, $alias, $content, $help)
+  function UpdateUserTag(?string $id = NULL, $alias, $content, $help)
   {
     if( empty($id) )
     {
@@ -367,4 +367,4 @@

 #
 # EOF
-#
\ No newline at end of file
+#

---


History