Skip to content

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future #16

Description

@pakricard

Hi:
On PHPlot 6.2.0, running on PHP 7.3.33
If I include the line

$graph->TuneYAutoRange(0, 2, 2);

I get: Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /includes/phplot/phplot.php on line 5424

If I comment that line of code, it doesn't throw any deprecated notice.

The solution is to replace line 5424 on PHPlot.php with:

if (isset($adjust_mode) && strpos('TRI', chr($adjust_mode[0])) !== FALSE)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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