Bug #79594 [NEW]: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given

From: Date: Wed, 13 May 2020 15:06:33 +0000
Subject: Bug #79594 [NEW]: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17570@lists.php.net to get a copy of this message
From:             vedad at kajtaz dot net
Operating system: FreeBSD
PHP version:      7.4.5
Package:          Documentation problem
Bug Type:         Bug
Bug description:Uncaught TypeError: preg_split() expects parameter 3 to be int, null given

Description:
------------
The preg_split documentation:

https://www.php.net/manual/en/function.preg-split.php

states:

> A limit of -1 or 0 means "no limit" and, as is standard across PHP,
you can use NULL to skip to the flags parameter.

However, passing null with strict_type throws a \TypeError:

Uncaught TypeError: preg_split() expects parameter 3 to be int, null
given


-- 
Edit bug report at https://bugs.php.net/bug.php?id=79594&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79594&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79594&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79594&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79594&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79594&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79594&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79594&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79594&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79594&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79594&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79594&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79594&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79594&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79594&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79594&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79594&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79594&r=mysqlcfg


Thread (4 messages)

« previous php.doc.bugs (#17570) next »