vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

GLOB_BRACE breaks non-GNU systems #313

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Go to examples page on a Solaris system.

What is the expected output? What do you see instead?
glob expected a long integer and got a string in second parameter

What version of the product are you using? On what operating system?
0.6.0 beta 2 on Solaris 10 with PHP 5.2.17

Here is a patch for this:
if (!defined("GLOB_BRACE")) {
  $test_files = glob("test/*");
  $test_files = preg_grep("/(" . implode("|",$extensions) . ")/i",$test_files);
} else {
  $test_files = glob("test/*.{".implode(",", $extensions)."}", GLOB_BRACE);
}

Original issue reported on code.google.com by a...@aerialdynamics.net on 27 Jun 2011 at 5:22

GoogleCodeExporter commented 9 years ago
Thanks for the info. We'll patch for the next release.

"Note: The GLOB_BRACE flag is not available on some non GNU systems, like 
Solaris."
http://php.net/manual/en/function.glob.php

Original comment by eclecticgeek on 27 Jun 2011 at 6:34

GoogleCodeExporter commented 9 years ago
Great project by the way...  I'll try and contribute back via the issue tracker 
if I enhance or troubleshoot other items.

Original comment by a...@aerialdynamics.net on 27 Jun 2011 at 8:15

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00