Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 1663
Zeile 134... Zeile 134...
134
    }
134
    }
Zeile 135... Zeile 135...
135
 
135
 
136
    private static function initDimensions()
136
    private static function initDimensions()
137
    {
137
    {
-
 
138
        if ('\\' === \DIRECTORY_SEPARATOR) {
138
        if ('\\' === \DIRECTORY_SEPARATOR) {
139
            $ansicon = getenv('ANSICON');
139
            if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
140
            if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) {
140
                // extract [w, H] from "wxh (WxH)"
141
                // extract [w, H] from "wxh (WxH)"
141
                // or [w, h] from "wxh"
142
                // or [w, h] from "wxh"
142
                self::$width = (int) $matches[1];
143
                self::$width = (int) $matches[1];
143
                self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
144
                self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
Zeile 214... Zeile 215...
214
        $descriptorspec = [
215
        $descriptorspec = [
215
            1 => ['pipe', 'w'],
216
            1 => ['pipe', 'w'],
216
            2 => ['pipe', 'w'],
217
            2 => ['pipe', 'w'],
217
        ];
218
        ];
Zeile -... Zeile 219...
-
 
219
 
-
 
220
        $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0;
218
 
221
 
219
        $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
222
        $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
220
        if (!\is_resource($process)) {
223
        if (!\is_resource($process)) {
221
            return null;
224
            return null;
Zeile 222... Zeile 225...
222
        }
225
        }
223
 
226
 
224
        $info = stream_get_contents($pipes[1]);
227
        $info = stream_get_contents($pipes[1]);
225
        fclose($pipes[1]);
228
        fclose($pipes[1]);
Zeile -... Zeile 229...
-
 
229
        fclose($pipes[2]);
-
 
230
        proc_close($process);
-
 
231
 
-
 
232
        if ($cp) {
226
        fclose($pipes[2]);
233
            sapi_windows_cp_set($cp);
227
        proc_close($process);
234
        }
228
 
235