|
From: <abe...@us...> - 2015-02-08 01:46:37
|
Revision: 6967
http://sourceforge.net/p/astlinux/code/6967
Author: abelbeck
Date: 2015-02-08 01:46:34 +0000 (Sun, 08 Feb 2015)
Log Message:
-----------
Fix for PHP scripts called via the command line that use 'argv' super-global variable, a bug added after PHP 5.3 seems to not properly setup if a super-global variable is not referenced (even not executed). The problem occurs when 'getopt' is used and 'argv' is required, the fix is a good general solution.
Ref: http://stackoverflow.com/questions/23911924/override-argv-for-getopt
Modified Paths:
--------------
branches/1.0/package/openldap/scripts/ldap-phone-name-lookup
branches/1.0/package/openldap/scripts/ldap-phone-num-lookup
branches/1.0/package/openldap/vcard-export
branches/1.0/project/astlinux/target_skeleton/bin/ldate
Modified: branches/1.0/package/openldap/scripts/ldap-phone-name-lookup
===================================================================
--- branches/1.0/package/openldap/scripts/ldap-phone-name-lookup 2015-02-08 01:09:32 UTC (rev 6966)
+++ branches/1.0/package/openldap/scripts/ldap-phone-name-lookup 2015-02-08 01:46:34 UTC (rev 6967)
@@ -1,5 +1,8 @@
#!/usr/bin/php -qC
<?php
+if (! isset($argv)) {
+ $argv = $_SERVER['argv'];
+}
// Function: LDAP_Client
//
Modified: branches/1.0/package/openldap/scripts/ldap-phone-num-lookup
===================================================================
--- branches/1.0/package/openldap/scripts/ldap-phone-num-lookup 2015-02-08 01:09:32 UTC (rev 6966)
+++ branches/1.0/package/openldap/scripts/ldap-phone-num-lookup 2015-02-08 01:46:34 UTC (rev 6967)
@@ -1,5 +1,8 @@
#!/usr/bin/php -qC
<?php
+if (! isset($argv)) {
+ $argv = $_SERVER['argv'];
+}
// Function: LDAP_Client
//
Modified: branches/1.0/package/openldap/vcard-export
===================================================================
--- branches/1.0/package/openldap/vcard-export 2015-02-08 01:09:32 UTC (rev 6966)
+++ branches/1.0/package/openldap/vcard-export 2015-02-08 01:46:34 UTC (rev 6967)
@@ -1,5 +1,8 @@
#!/usr/bin/php -qC
<?php
+if (! isset($argv)) {
+ $argv = $_SERVER['argv'];
+}
//AstLinux// Adapted for AstLinux - 10-11-2013 by Lonnie Abelbeck
//AstLinux// Single shared file vcard-parse-convert.php, use name "vcard-export"
Modified: branches/1.0/project/astlinux/target_skeleton/bin/ldate
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/bin/ldate 2015-02-08 01:09:32 UTC (rev 6966)
+++ branches/1.0/project/astlinux/target_skeleton/bin/ldate 2015-02-08 01:46:34 UTC (rev 6967)
@@ -1,5 +1,8 @@
#!/usr/bin/php -qC
<?php
+if (! isset($argv)) {
+ $argv = $_SERVER['argv'];
+}
$loc_file = '/usr/lib/locale/.locale';
$format = '%c';
$date_string = '';
@@ -63,7 +66,7 @@
echo "$usage\n";
exit(0);
} elseif ($argv[$i] === '--version') {
- echo "ldate: v1.0.0\n";
+ echo "ldate: v1.0.1\n";
exit(0);
} elseif ($argv[$i] === '-d' && isset($argv[$i+1])) {
$date_string = $argv[++$i];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|