php 8 related warnings noticed via attached stylesheets say added via plugins
#1
subject in relation to core file: admin/modules/style/themes.php

just noticed on php 8.0.8 warnings / errors whenever using a plugin that adds a stylesheet(s) for example say globally attached or what not and while I did not want to take the time to dig into it as free time is limited, I did find that quickly simply modifying these lines as follows made such go away quickly as such was annoying one slightly, hence why one figured such should be mentioned just in case this has not yet been noticed and reported by anyone as of yet as this issue appears to occur with at least a few plugins so far tried that add / utilize stylesheets attached globally and or what not.


1710 
I am sure you get the point, line # was mentioned as a hint to related warning

1833 
I am sure you get the point, line # was mentioned as a hint to related warning

1849
I am sure you get the point, line # was mentioned as a hint to related warning

1980   
I am sure you get the point, line # was mentioned as a hint to related warning

2018 
I am sure you get the point, line # was mentioned as a hint to related warning

2184
I am sure you get the point, line # was mentioned as a hint to related warning

2392
I am sure you get the point, line # was mentioned as a hint to related warning
Reply
#2
Most of these changes are incorrect. You can't just change actual values to booleans.
[Image: banner.png]
Reply
#3
(2022-05-23, 04:59 PM)StefanT Wrote: Most of these changes are incorrect. You can't just change actual values to booleans.

right, @ StefanT, I am aware that most are not correct, (sometimes the concept of being a "mr. break rules" quickly works when temporarily wanting to break something enough get something to not function on purpose, lol) but, that was not the point, hence why I stated clearly in the initial statement that as stated: "I did not have free time to dig into them as free time was limited", obviously as I was in the middle of alot of other tasks at time of such notice and reporting of such and still am, I only displayed the lines as presented in example of how I quickly found the lines and temporarily removed them for my temporary usage on one localhost as such was annoying me while doing other tasks that required warning / error report visual display active thus as such was noticed during such tasks, and again on a completely different localhost while doing tasks that required warning visual display and seeing such warning annoying one such during other dev tasks while mildly varying line numbers for the exact same issues I instead quickly blanked the error display on most of such simply by: *
    //1710 blank out an annoying warning
    ...
    // 1832 blank out an annoying warning  
    $this_stylesheet['inherited'][$stylesheet['name']] = isset($this_stylesheet['inherited'][$stylesheet['name']]) ? $this_stylesheet['inherited'][$stylesheet['name']] : ''; 
    // 1851 blank a warning   
    $this_stylesheet['applied_to'] = isset($this_stylesheet['applied_to']) ? $this_stylesheet['applied_to'] : '';  
    // 1982 blank out an annoying warning
    $stylesheet['colors'] = isset($stylesheet['colors']) ? $stylesheet['colors'] : '';  
    // 2021 blank out an annoying warning
    $check_actions = isset($check_actions) ? $check_actions : '';      
    // 2184 blank out an annoying warning
    $stylesheets[$stylesheet['name']] = isset($stylesheets[$stylesheet['name']]) ? $stylesheets[$stylesheet['name']] : '';
lols, @ just simply something done temporarily to remove such and the growing annoyance at having such warnings displayed when working on something else that I was trying to only see existing warnings for...
 
* again, please do not begin to mistake my mentionings of how something was simply blanked out (only for personal usage temporarily to end the utter annoyance of seeing such while working on something else), as say anything like a statement of supplied solution nor suggested fix in the least, lol. Nor is it like I suggested hey just get her done by simply adding @ to blank the warning display or anything, too funny, lol...

and yet again on a completely different localhost while doing tasks that required warning visual display and desiring to not see the specific warnings I simply opted to temporarily:
    // @ stylesheet cachefile
    if(!isset($stylesheets[$stylesheet['cachefile']]))
    {
	  $stylesheets[$stylesheet['cachefile']] = '';
    }
    // @ inherited stylesheet name
    if(!isset($this_stylesheet['inherited'][$stylesheet['name']]))
    {
	  $this_stylesheet['inherited'][$stylesheet['name']] = '';
    }
    // @ colors
    if(!isset($stylesheet['colors']))
    {
	    $stylesheet['colors'] = '';
    }
    // @ check_actions
    if(!isset($check_actions))
    {
	   $check_actions = '';
    }
    // @ stylesheet name
    if(!isset($stylesheets[$stylesheet['name']]))
    {
	   $stylesheets[$stylesheet['name']] = '';
    }	
    // @ stylesheet name
    if(!isset($stylesheets[$stylesheet['name']]))
    {
       $stylesheets[$stylesheet['name']] = '';
    }

and lol, yet again on a completely different localhost while doing tasks that required warning visual display and desiring to not see the specific warnings I simply opted temporarily to:
     // @ stylesheet cachefile
     if(empty($stylesheets[$stylesheet['cachefile']]))
     {
	  $stylesheets[$stylesheet['cachefile']] = '';
     }
    // @ inherited stylesheet name
    if(empty($this_stylesheet['inherited'][$stylesheet['name']]))
     {
	   $this_stylesheet['inherited'][$stylesheet['name']] = '';
     }
    // @ colors
    if(empty($stylesheet['colors']))
    {
	    $stylesheet['colors'] = '';
    }
    // @ check_actions
    if(empty($check_actions))
    {
	   $check_actions = '';
    }
    // @ stylesheet name
    if(empty($stylesheets[$stylesheet['name']]))
    {
	   $stylesheets[$stylesheet['name']] = '';
    }	
    // @ stylesheet name
    if(empty($stylesheets[$stylesheet['name']]))
    {
       $stylesheets[$stylesheet['name']] = '';
    } 

I noted the initial temps and related line numbers in such just as I am noting the other temps and related line numbers again simply not as a supplied fix in the least but simply as the hint: that these are roughly the lines in question that warnings suggest every single time such issues occur in relation to the entirety of the initial post subject matter, ie: issues pertaining to warnings found using plugins with globally added/used stylesheets via said plugins and mybb on php 8 and just maybe perhaps the varied line numbers that such focus may need to be on hence the entire reason to report such in the first place, nothing more, at no point was it suggested that such was providing a fix. Granted that is usually the entire point of reporting is to note such is present, where you noticed such and is not necessarily expected nor required to then also as such one must provide the fix in the report by the very reporter of such also, in the first place is it not? On the contrary is it not the staff / developers like yourself tasks to read mentioned issues in such a section supplied exactly for that reason* (to submit and mention issues!) and then supply the fixes in the future via the core as one would assume that is part of the position & tasks description and responsibilities of such staff, not say make assumptions that a suggested tempory bypass a user mentioned they did simply after noticing the issue in the first, is a suggested solution and thus begin to tell one '" well, you cannot...". Of course, one can do whatever the hell they want, but of course in reality instead of doing such that is why the issue was mentioned, ya'll can fix it or not. Regardless on that note, perhaps if such is expected by every issues reporter to not only report an issue but then supply a fix and or stand and be corrected and or have ones entire initial reason and point be erroneously interpreted, when not even supplying a fix to begin with and only reporting an issue, well, hmm, ever try looking to see the issue present and mentioning a fix rather than hastily replying before neither? And honestly after reading such an initial response that clearly did not even understand the point to begin with, then if that experience is commonplace then ones in the future perhaps shall refrain from reporting things already noticed and or may notice in future, just a thought. Not really needing a reply to such, further correction, after such nor am I interested in further reporting any other issue found or will be found in future, regardless if I may choose to stay around and continue to help folks (unless simply stating my opinion here on the experience will get me censored and banned, lol) or just simply say screw it I do not need the headache.  Thanks. Wink
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)