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

PHP Notice: Uninitialized string offset: 1 #25

Closed
samdark opened this issue May 8, 2018 · 7 comments
Closed

PHP Notice: Uninitialized string offset: 1 #25

samdark opened this issue May 8, 2018 · 7 comments
Assignees

Comments

@samdark
Copy link

samdark commented May 8, 2018

Version is 2.0.13-1-g0dd0ff3 (phar downloaded from releases page)

$ php phpcf.phar test.php
Max file size set to: 1.000 MiB
PHP Notice:  Undefined offset: 1 in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/TerminalInfo.php on line 108

Notice: Undefined offset: 1 in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/TerminalInfo.php on line 108
PHP Notice:  Undefined offset: 1 in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/TerminalInfo.php on line 108

Notice: Undefined offset: 1 in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/TerminalInfo.php on line 108
PHP Warning:  A non-numeric value encountered in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/Application.php on line 125

Warning: A non-numeric value encountered in phar://C:/dev/skyeng/skyeng/phpcf.phar/src/Application.php on line 125

File test.php

Analyzer has not detected any problems in your code.
Peak memory usage: 2.466 MB
@wapmorgan wapmorgan self-assigned this May 8, 2018
@wapmorgan
Copy link
Owner

Try phpcf-2.0.13-8-g98ea1f3.phar.
And one question: you run it from docker image or something similar?

@samdark
Copy link
Author

samdark commented May 8, 2018

Same with this phar. I'm running it with stock PHP 7.1.9 on Windows.

@wapmorgan
Copy link
Owner

Can you give output of mode command from cmd? Seems like format is different

@samdark
Copy link
Author

samdark commented May 8, 2018

Status for device LPT1:
-----------------------
    Printer output is not being rerouted.


Status for device COM1:
-----------------------
    Baud:            1200
    Parity:          None
    Data Bits:       7
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     ON
    RTS circuit:     ON


Status for device CON:
----------------------
    Lines:          1000
    Columns:        160
    Keyboard rate:  31
    Keyboard delay: 0
    Code page:      65001

@samdark
Copy link
Author

samdark commented May 8, 2018

Here's what works well and is battle-tested: https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseConsole.php#L622

@wapmorgan
Copy link
Owner

Ok, thanks. In last phar it should work fine.

@samdark
Copy link
Author

samdark commented May 10, 2018

It does. Thanks!

@samdark samdark closed this as completed May 10, 2018
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