php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57659 Error in config.w32
Submitted: 2007-05-09 09:32 UTC Modified: 2007-06-02 14:59 UTC
From: auroraeosrose at gmail dot com Assigned:
Status: Closed Package: yaz (PECL)
PHP Version: 5_2 CVS-2007-05-09 OS: WinXPSP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: auroraeosrose at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-09 09:32 UTC] auroraeosrose at gmail dot com
Description:
------------
you need to check that what file_get_contents returns is a string before attempting a match on it or jscript will bail - patch attached

Reproduce code:
---------------
Index: config.w32
===================================================================
RCS file: /repository/pecl/yaz/config.w32,v
retrieving revision 1.3
diff -u -r1.3 config.w32
--- config.w32	21 Apr 2004 12:38:28 -0000	1.3
+++ config.w32	9 May 2007 13:24:51 -0000
@@ -15,7 +15,7 @@
 	}
 
 	c = file_get_contents(yaz_h + "\\yaz\\yaz-version.h");
-	if (c.match(/YAZ_VERSIONL\s+(0x[a-zA-Z0-9]+)/)) {
+	if (typeof(c) == "string" && c.match(/YAZ_VERSIONL\s+(0x[a-zA-Z0-9]+)/)) {
 		v = RegExp.$1;
 		if (parseInt(v) >= 0x2000D) {
 			return true;



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-02 14:59 UTC] adam at indexdata dot dk
Patch applied to CVS.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 11:03:38 2021 UTC