Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 13 Nov 2015 22:26:37 +0000 (23:26 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 13 Nov 2015 22:26:37 +0000 (23:26 +0100)
- ignored more bad lines (causes by php-fuse)
- added extension_foo_loaded (DONT TOUCH THIS)
- the script should check for existence (see 'hub' project) of an optional
  PHP extension and then set the corresponding option to TRUE
- the above will later be made more generic

Signed-off-by: Roland Häder <roland@mxchange.org>
contrib/find-bad-php.sh
inc/config.php
inc/main/classes/crypto/class_CryptoHelper.php

index 2fdfecf45b9391673b127911bf8eae0335154842..85af1b24555a99968d6d8dee410429de5626508f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 echo "$0: Searching for PHP scripts (except 3rd party) ..."
 #!/bin/sh
 
 echo "$0: Searching for PHP scripts (except 3rd party) ..."
-PHP=`find -type f -name "*.php" | grep -v "third_party"`
+PHP=`find -type f -name "*.php" 2>&1 | grep -v "third_party"`
 
 for SCRIPT in ${PHP};
 do
 
 for SCRIPT in ${PHP};
 do
@@ -19,7 +19,7 @@ do
                echo "$0: Script '${SCRIPT}' has non-typical footer."
        fi
 
                echo "$0: Script '${SCRIPT}' has non-typical footer."
        fi
 
-       LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "No syntax errors detected in"`
+       LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in"`
 
        if [ -n "${LINT}" ]
        then
 
        if [ -n "${LINT}" ]
        then
index 2f3b5faaecc7b1273aaa06c212888721a664413a..d4b24e7c3bb7deab229ed40fc792b93670d83c6d 100644 (file)
@@ -464,5 +464,11 @@ $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
 // CFG: IPC-SOCKET-FILE-NAME
 $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
 
 // CFG: IPC-SOCKET-FILE-NAME
 $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
 
+// CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
+$cfg->setConfigEntry('extension_scrypt_loaded', FALSE);
+
+// CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
+$cfg->setConfigEntry('extension_uuid_loaded', FALSE);
+
 // [EOF]
 ?>
 // [EOF]
 ?>
index 03458ee5f17f138d8f4695978bf57f4669c1d4a5..8acedc897ddb82648eec495f58650dc55abeb834 100644 (file)
@@ -142,8 +142,8 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                // Init empty UUID
                $uuid = '';
 
                // Init empty UUID
                $uuid = '';
 
-               // Is the UUID extension loaded? (see pecl)
-               if ((extension_loaded('uuid')) && (function_exists('uuid_create'))) {
+               // Is the UUID extension loaded and enabled? (see pecl)
+               if ($this->getConfigInstance()->getConfigEntry('extension_uuid_loaded') === TRUE) {
                        // Then add it as well
                        $uuid = uuid_create();
                } // END - if
                        // Then add it as well
                        $uuid = uuid_create();
                } // END - if