Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1091

PostPosted: Thu Nov 17, 2022 5:41 am Reply with quote

Code:
Deprecated: Return type of sql_db::prepare($query) should either be compatible with mysqli::prepare(string $query): mysqli_stmt|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www.bestbuildpc.org/db/mysqli.php on line 558


Deprecated: Return type of sql_db::set_charset($charset = 'utf8') should either be compatible with mysqli::set_charset(string $charset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www.bestbuildpc.org/db/mysqli.php on line 405

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /www.bestbuildpc.org/includes/ipban.php on line 37


Line 37 from ipban.php

Code:
$ip_class_banned = explode('.', $ip_address);


I replaced it with this one and the error is gone.

Code:
$ip_class_banned = explode('.', $ip_address ?? '');



Line mysqli.php on line 558

Code:
   public function prepare($query) {

      $this->preparedStatement = $query;
      $this->stmt_obj = parent::stmt_init();
      $this->stmt_obj->prepare($query);
      return $this->stmt_obj;
   }


I replaced it with this one and I error is gone.

Code:
   public function mysqli_prepare($query) {

      $this->preparedStatement = $query;
      $this->stmt_obj = parent::stmt_init();
      $this->stmt_obj->mysqli_prepare($query);
      return $this->stmt_obj;
   }


line 405 on mysqli.php

Code:
   function set_charset($charset = 'utf8') {

      if (function_exists('mysqli_set_charset')) {
         if ($this->set_charset($charset)) {
            return;
         }
      }
      $this->sql_query('SET NAMES ' . $charset);
   }



I replaced it with this one and the error is gone.

Code:


   function mysqli_set_charset($charset = 'utf8') {
      if (function_exists('mysqli_set_charset')) {
         if ($this->mysqli_set_charset($charset)) {
            return;
         }
      }
      $this->sql_query('SET NAMES ' . $charset);
   }


Deprecated: Function strftime() is deprecated in /www.bestbuildpc.org/modules/Downloads/includes/nsngd_func.php on line 420


Code:
function newcategorygraphic($cat) {

   global $prefix, $db, $module_name,$locale;
   $cat = intval($cat);
   $newresult = $db->sql_query('SELECT `date` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = ' . $cat . ' ORDER BY `date` DESC LIMIT 1');
   if (list($time) = $db->sql_fetchrow($newresult)) {
      echo ' ';
      setlocale(LC_TIME, $locale);
      preg_match('%([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})%', $time, $datetime);
      $datetime = strftime(_DL_LINKSDATESTRING, mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));
      $datetime = ucfirst($datetime);
      $startdate = time();
      $count = 0;
      while ($count <= 14) {
         $daysold = date('d-M-Y', $startdate);
         if ($daysold == $datetime) {
            $myimage = myimage('new_01.png');
            if ($count <= 1) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATNEWTODAY , '" title="' , _DL_DCATNEWTODAY , '" />';
            }
            $myimage = myimage('new_03.png');
            if ($count <= 3 && $count > 1) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATLAST3DAYS , '" title="' , _DL_DCATLAST3DAYS , '" />';
            }
            $myimage = myimage('new_07.png');
            if ($count <= 7 && $count > 3) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATTHISWEEK , '" title="' , _DL_DCATTHISWEEK , '" />';
            }
            $myimage = myimage('new_14.png');
            if ($count <= 14 && $count > 7) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATLAST2WEEKS , '" title="' , _DL_DCATLAST2WEEKS , '" />';
            }
         }
         $count++;
         $startdate = (time() -(86400*$count));
      }
   }
   return;
}


Line 420

Code:
$datetime = strftime(_DL_LINKSDATESTRING, mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));


I replaced this line with this one and the error is gone.

Code:
function newcategorygraphic($cat) {

   global $prefix, $db, $module_name,$locale, $timezone;
   $cat = intval($cat);
   $newresult = $db->sql_query('SELECT `date` FROM `' . $prefix . '_nsngd_downloads` WHERE `cid` = ' . $cat . ' ORDER BY `date` DESC LIMIT 1');
   if (list($time) = $db->sql_fetchrow($newresult)) {
      echo '&nbsp;';
      setlocale(LC_TIME, $locale);
$formatter = new IntlDateFormatter($locale, IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $timezone);
return $formatter->format(new DateTime());//
      preg_match('%([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})%', $time, $datetime);
      $datetime = strftime(_DL_LINKSDATESTRING, mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));
      $datetime = ucfirst($datetime);
      $startdate = time();
      $count = 0;
      while ($count <= 14) {
         $daysold = date('d-M-Y', $startdate);
         if ($daysold == $datetime) {
            $myimage = myimage('new_01.png');
            if ($count <= 1) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATNEWTODAY , '" title="' , _DL_DCATNEWTODAY , '" />';
            }
            $myimage = myimage('new_03.png');
            if ($count <= 3 && $count > 1) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATLAST3DAYS , '" title="' , _DL_DCATLAST3DAYS , '" />';
            }
            $myimage = myimage('new_07.png');
            if ($count <= 7 && $count > 3) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATTHISWEEK , '" title="' , _DL_DCATTHISWEEK , '" />';
            }
            $myimage = myimage('new_14.png');
            if ($count <= 14 && $count > 7) {
               echo '<img align="middle" src="' , $myimage , '" alt="' , _DL_DCATLAST2WEEKS , '" title="' , _DL_DCATLAST2WEEKS , '" />';
            }
         }
         $count++;
         $startdate = (time() -(86400*$count));
      }
   }
   return;
}


Fatal error: Uncaught Error: Call to undefined function each() in /www.bestbuildpc.org/modules/Forums/common.php:119 Stack trace: #0 /www.bestbuildpc.org/modules/Forums/index.php(3Cool: include_once() #1 /www.bestbuildpc.org/home/modules.php(87): include_once('...') #2 {main} thrown in /www.bestbuildpc.org/modules/Forums/common.php on line 119

Code:
ini_set('magic_quotes_runtime', 0);{

   if( is_array($HTTP_GET_VARS) )
   {
      while( list($k, $v) = each($HTTP_GET_VARS) )
      {
         if( is_array($HTTP_GET_VARS[$k]) )
         {
            while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
            {
               $HTTP_GET_VARS[$k][$k2] = addslashes($v2);
            }
            @reset($HTTP_GET_VARS[$k]);
         }
         else
         {
            $HTTP_GET_VARS[$k] = addslashes($v);
         }
      }
      @reset($HTTP_GET_VARS);
   }

   if( is_array($HTTP_POST_VARS) )
   {
      while( list($k, $v) = each($HTTP_POST_VARS) )
      {
         if( is_array($HTTP_POST_VARS[$k]) )
         {
            while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
            {
               $HTTP_POST_VARS[$k][$k2] = addslashes($v2);
            }
            @reset($HTTP_POST_VARS[$k]);
         }
         else
         {
            $HTTP_POST_VARS[$k] = addslashes($v);
         }
      }
      @reset($HTTP_POST_VARS);
   }

   if( is_array($HTTP_COOKIE_VARS) )
   {
      while( list($k, $v) = each($HTTP_COOKIE_VARS) )
      {
         if( is_array($HTTP_COOKIE_VARS[$k]) )
         {
            while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
            {
               $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
            }
            @reset($HTTP_COOKIE_VARS[$k]);
         }
         else
         {
            $HTTP_COOKIE_VARS[$k] = addslashes($v);
         }
      }
      @reset($HTTP_COOKIE_VARS);
   }
}


Since each function has been removed as of PHP 8.0

I tried to replace those codes but not lucky

Code:
foreach ($HTTP_GET_VARS as $k => $v) {

 $kv = [$k, $v];
}
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1723

PostPosted: Thu Nov 17, 2022 11:30 am Reply with quote

Can you please stop giving advice as long you don't know what are you doing there? Just when a warning is gone, it doesn't mean you solved the issue. Wink For example in the file ipban.php don't exist functions like mysqli_prepare or mysqli_set_charset and your example for the deprecated function strftime is not a solution because it is still in use. Thanks.

_________________
Github: RavenNuke 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©