nicholasmr / obblm

Automatically exported from code.google.com/p/obblm
26 stars 54 forks source link

PHP dependency is not 5.1, but 5.2 #516

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,
I am the administrator of the Socks' League, a french league. I have noticed 
that the OBBLM needs the function array_fill_keys. In the PHP documentation, 
array_fill_keys exist only on PHP5.2 or above.
I have added this part of code at the end of 'lib/misc_functions.php' :

    if(false === function_exists('array_fill_keys') ){
      function array_fill_keys($keys , $value){
        $returnArray = array();
        if( ( true === isset($keys) ) && ( true === is_array($keys) ) ){
          foreach($keys  as $key){
            $returnArray[$key]=$value;
          }
        }
        return $returnArray;
      }
    }

Hope this help

Trambi, alias Bertrand MADET 

Original issue reported on code.google.com by Nimda...@gmail.com on 26 May 2011 at 10:15

GoogleCodeExporter commented 9 years ago
So just change the dependancy to 5.2, right:)

Original comment by funnyfin...@hotmail.com on 26 May 2011 at 7:43

GoogleCodeExporter commented 9 years ago
I have looked at some statistics for what PHP vesion webservers use, and ~83% 
use 5.2.
Due to this, and the fact that 5.1 is no longer supported, I'll change the 
obblm PHP requirements.

Original comment by Nimda...@gmail.com on 27 May 2011 at 11:08

GoogleCodeExporter commented 9 years ago
r837

Original comment by Nimda...@gmail.com on 27 May 2011 at 3:07

GoogleCodeExporter commented 9 years ago
Bad thing is that Free, a large free french webhoster use PHP5.1 and the 
website of our association is hosted by Free.
As a conclusion, I will use my specific part of code in 
'lib/misc_functions.php'.

Original comment by bertrand...@gmail.com on 27 May 2011 at 4:40

GoogleCodeExporter commented 9 years ago
I understand. Keep the fix.

But really, it's a larger problem for your host than you :-). They really 
should upgrade PHP.. (see my point above)

Original comment by Nimda...@gmail.com on 27 May 2011 at 4:48