Jump to content

Checking string bug :(


Tuck

Recommended Posts

      $id1 = str_replace("STEAM_", "", $id);
      $id2 = explode(":", ${id1});
      if (!id2[0]>=0 && !id2[0]<=5) {
         return false;
      }
      if (!id2[1]>=0 && !id2[1]<=9) {
         return false;
      }

 

suppose to split STEAM_ from the id and then split whats left via ":" and then check the integers

Link to comment
https://forums.phpfreaks.com/topic/177111-checking-string-bug/
Share on other sites

      $id1 = str_replace("STEAM_", "", $id);
      $id2 = explode(":", ${id1});
      if (!id2[0]>=0 && !id2[0]<=5) {
         return false;
      }
      if (!id2[1]>=0 && !id2[1]<=9) {
         return false;
      }

 

suppose to split STEAM_ from the id and then split whats left via ":" and then check the integers

 

found the bug forgot $ in front of arrays ;(

Link to comment
https://forums.phpfreaks.com/topic/177111-checking-string-bug/#findComment-933862
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.