Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Undefined offset: 1 in PHPInfo.php line 54 #1

Open
ZeroThe2nd opened this issue Aug 29, 2018 · 1 comment
Open

Error: Undefined offset: 1 in PHPInfo.php line 54 #1

ZeroThe2nd opened this issue Aug 29, 2018 · 1 comment

Comments

@ZeroThe2nd
Copy link

Using the following code in a function:

ob_start();
phpinfo();
$phpinfoAsString = ob_get_contents();
ob_get_clean();

$phpInfo = new PHPInfo();
$phpInfo->setText($phpinfoAsString);
return response()->json($phpInfo->get());

Results in an "Undefined offset: 1 in PHPInfo.php line 54" which is being triggered by the last line where $phpInfo->get() is being called as part of the response.

The code is running from a Lumen controller (Laravel API).
Versions:
"Lumen": "Lumen (5.6.4) (Laravel Components 5.6.*)",
"PHP": "7.1.19"

@ivanstan
Copy link

ivanstan commented May 1, 2020

Same here for php 7.4. I see that function _parseHTML is not implemented yet and phpinfo function returns html, this is confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants