Skip to content

Use preg_split instead of actually breaking the line for explode #3

Description

@edupooter

In at least two files you are passing linebreaks as first argument to the explode function, like this:

1st example:
public\get_log.php

$file = explode ( '
', (mb_convert_encoding($curl, 'HTML-ENTITIES', "UTF-8")));

2nd example:
public\get_log_all.php:18

The best pratice in order to follow the PSR rules would be to use regex split function like this:

$file = preg_split('/[\r\n]+/', $curl);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions