~canonical-sysadmins/wordpress/4.4.2

« back to all changes in this revision

Viewing changes to wp-includes/random_compat/random.php

  • Committer: Barry Price
  • Date: 2016-01-07 06:09:42 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: barry.price@canonical.com-20160107060942-1ghv2tqiwm8z0j36
Merge WP4.4.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
            extension_loaded('com_dotnet') &&
91
91
            class_exists('COM')
92
92
        ) {
93
 
            try {
94
 
                $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
95
 
                if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
96
 
                    // See random_bytes_com_dotnet.php
97
 
                    require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php';
 
93
            $RandomCompat_disabled_classes = preg_split(
 
94
                '#\s*,\s*#', 
 
95
                strtolower(ini_get('disable_classes'))
 
96
            );
 
97
            
 
98
            if (!in_array('com', $RandomCompat_disabled_classes)) {
 
99
                try {
 
100
                    $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
 
101
                    if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
 
102
                        // See random_bytes_com_dotnet.php
 
103
                        require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php';
 
104
                    }
 
105
                } catch (com_exception $e) {
 
106
                    // Don't try to use it.
98
107
                }
99
 
            } catch (com_exception $e) {
100
 
                // Don't try to use it.
101
108
            }
 
109
            $RandomCompat_disabled_classes = null;
102
110
            $RandomCompatCOMtest = null;
103
111
        }
104
112
        if (