CMS MADE SIMPLE FORGE

SnippetMgr

 

[#12759] Silence PHP8.0 warnings in SnippetMgr.module.php

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

Assigned To:
Version: 1.4.3
CMSMS Version: 2.2.21
Severity: Minor
Resolution: None
State: Open
Summary:
Silence PHP8.0 warnings in SnippetMgr.module.php
Detailed Description:
PHP Warning:  Private methods cannot be final as they are never overridden by
other classes in
/home/stephens/public_html/devel/modules/SnippetMgr/SnippetMgr.module.php on
line 60

patch follows: 
---

-bash@host5.mad4us.com:~ {1003}>$ diff -u
www/modules/SnippetMgr/SnippetMgr.module.php
www/devel/modules/SnippetMgr/SnippetMgr.module.php
--- www/modules/SnippetMgr/SnippetMgr.module.php        2020-03-11
13:53:30.000000000 -0400
+++ www/devel/modules/SnippetMgr/SnippetMgr.module.php  2024-10-11
10:29:47.801000000 -0400
@@ -57,7 +57,7 @@
     function UninstallPreMessage() { return $this->Lang('really_uninstall'); }

   # private
-  private final function _autoloader($classname)
+  public final function _autoloader($classname)
   {
     $parts = explode('\\', $classname);
     $classname = end($parts);
@@ -197,4 +197,4 @@

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

---
as mentioned by KiwiChris in #cms, unless there's a more preferable way to deal
with this


History