How to solve the use of the deprecated ereg () function of PHP 5.3.0 in Drupal 6.13

Does anyone know how to resolve this error below?

Deprecated: the ereg () function is deprecated in C: \ wamp \ www \ includes \ file.inc on line 895

This happens after installing Drupal 6.13 on server 2.0 2.0 with PHP 5.3.0

+3
source share
8 answers

Clear your error report below E_DEPRECATED .

PHP 5.3 : E_DEPRECATED E_USER_DEPRECATED - PHP - API. ereg_ * - , , , ", , ​​, ".

+14

preg_match('/\.([^\.]*$)/', $this->file_src_name, $extension);

ereg('\.([^\.]*$)', $this->file_src_name, $extension);
+17

Drupal. Drupal , PHP 5.3, PHP .

1: PHP. PHP 5.2.x. Drupal PHP 5.3.

2: , PHP 5.3, . Drupals include/common.inc, :

if ($ errno (E_ALL ^ ​​E_NOTICE)) { :

if ($ errno (E_ALL ~ E_NOTICE ~ E_DEPRECATED)) {

.

0

, PHP 5.3.0. 5.2.9, drupal: http://drupal.org/node/514334

-1

, php- .

error_reporting(E_ALL ^ E_DEPRECATED);

. .

-1

Source: https://habr.com/ru/post/1712699/


All Articles