Skip to content

Commit 1fbc309

Browse files
committed
Merge branch 'PHP-7.3'
2 parents e7e8112 + 69f54dd commit 1fbc309

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

ext/standard/browscap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ PHP_FUNCTION(get_browser)
757757
found_entry = zend_hash_str_find_ptr(bdata->htab,
758758
DEFAULT_SECTION_NAME, sizeof(DEFAULT_SECTION_NAME)-1);
759759
if (found_entry == NULL) {
760-
efree(lookup_browser_name);
760+
zend_string_release(lookup_browser_name);
761761
RETURN_FALSE;
762762
}
763763
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Firefox]
2+
Browser="Firefox"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
get_browser() without a default
3+
--INI--
4+
browscap={PWD}/browscap_no_default.ini
5+
--FILE--
6+
<?php
7+
8+
var_dump(get_browser(""));
9+
10+
?>
11+
--EXPECT--
12+
bool(false)

0 commit comments

Comments
 (0)