php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58913 Wrong call to strpos() in SCA_CommentReader
Submitted: 2009-10-22 07:01 UTC Modified: 2013-02-16 16:19 UTC
From: mail at daniel-berlin dot de Assigned: rasmus (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.10 OS: Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mail at daniel-berlin dot de
New email:
PHP Version: OS:

 

 [2009-10-22 07:01 UTC] mail at daniel-berlin dot de
Description:
------------
When executing a simple soap call, I get this error:

strpos() expects parameter 3 to be long, string given in /usr/local/lib/SCA/SCA_CommentReader.php on line 385 

This trivial patch fixes it:

--- SCA_CommentReader.php.orig  2009-10-22 12:49:18.000000000 +0200
+++ SCA_CommentReader.php       2009-10-22 12:49:25.000000000 +0200
@@ -382,7 +382,7 @@
                 $words      = explode(" ", $targetLine);
                 for ($i = 0; $i < count($words); $i++) {
                     $word = trim($words[$i++]);
-                    if (strpos($word, $word, $bindingAnnotation) === 0) {
+                    if (strpos($word, $bindingAnnotation) === 0) {
                         $binding = substr($word, strlen($bindingAnnotation));
                         break;
                     }



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-16 16:19 UTC] rasmus@php.net
Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=329489
Log: Fix bad strpos call. Fixes bug #58913
 [2013-02-16 16:19 UTC] rasmus@php.net
Fixed in svn
 [2013-02-16 16:19 UTC] rasmus@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: rasmus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 18:01:27 2025 UTC