Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLOB_BRACE breaks non-GNU systems #319

Closed
PhenX opened this issue Dec 6, 2012 · 2 comments
Closed

GLOB_BRACE breaks non-GNU systems #319

PhenX opened this issue Dec 6, 2012 · 2 comments

Comments

@PhenX
Copy link
Member

PhenX commented Dec 6, 2012

Original author: a...@aerialdynamics.net (June 27, 2011 17:22:36)

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: http://code.google.com/p/dompdf/issues/detail?id=313

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on June 27, 2011 18:34:32
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

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From a...@aerialdynamics.net on June 27, 2011 20:15:25
Great project by the way... I'll try and contribute back via the issue tracker if I enhance or troubleshoot other items.

@PhenX PhenX closed this as completed in 9005d63 Feb 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant