php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81552 xdiff_string_bpatch() and others missing
Submitted: 2021-10-25 09:31 UTC Modified: 2022-05-24 13:23 UTC
From: pleasestand at live dot com Assigned: remi (profile)
Status: Closed Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2021-10-25 09:31 UTC] pleasestand at live dot com
Description:
------------
In PECL xdiff 2.1.0, the arginfo is now generated from a stub file. Unfortunately, the stub file includes the aliases but leaves out the actual names for the following functions:

xdiff_file_bdiff()
xdiff_file_bpatch()
xdiff_string_bdiff()
xdiff_string_bpatch()

This breaks scripts that call these functions using their actual names as opposed to the aliases ("_binary" at the end instead of "b"). The bug was introduced in the following commit:

https://github.com/php/pecl-text-xdiff/commit/7e762e743e8607d2007a02382d2c845a7a5b8682

Test script:
---------------
<?php
$s1 = 'The quick brown fox jumps over the lazy dog.';
$s2 = 'The quick brown fox jumps over the lazy cog.';
var_dump(xdiff_string_bpatch($s1, xdiff_string_bdiff($s1, $s2)));

Expected result:
----------------
string(44) "The quick brown fox jumps over the lazy cog."

Actual result:
--------------
PHP Fatal error:  Uncaught Error: Call to undefined function xdiff_string_bpatch() in /home/ki/test.php:4
Stack trace:
#0 {main}
  thrown in /home/ki/test.php on line 4

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-25 09:48 UTC] pleasestand at live dot com
The following pull request has been associated:

Patch Name: Fixed bug #81552 (xdiff_string_bpatch() and others missing)
On GitHub:  https://github.com/php/pecl-text-xdiff/pull/6
Patch:      https://github.com/php/pecl-text-xdiff/pull/6.patch
 [2021-10-25 13:51 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2022-05-24 13:23 UTC] remi@php.net
-Status: Verified +Status: Closed -Package: xdiff +Package: *General Issues -Assigned To: +Assigned To: remi
 [2022-05-24 13:23 UTC] remi@php.net
Fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC